This will get closed, but i'll try to help you until then. Your attempt to smooth the movement is screwing you over because you're not including that in your collision checks. So even though your camera is at position 0 or maximum after collision checking your smooth offsets it when rendering and since this offset changes in the range (0, 1) of your tile's size you get jittering because you keep recalculating it each mouse move.
Personally i'd rework most of the code, but this is the immediate issue. Assuming your calculations are correct and skipping your poor coding practices, which i assume are a quick hack, you should either cut the smoothing, since it's kind of unnecessary IMHO, or you should check whether your camera is near an edge before calculating your smoothing.