Proper array deletion for the temporary buffer

See: http://www.cplusplus.com/reference/new/operator%20delete[]/
Mouse button translation with table

Mouse button translations happen with a table now rather than using a
case statement each time. This makes the code more efficient/faster and
saves a stack call.
Removed the temporary buffer, not needed

The temporary buffer allocation and deallocation every frame isn't
required. This minimized the amount of code in a couple other functions
as well so I removed them to save stack calls.