Created mouse operations into methods, fixed integer division problem