Added more mouse functionality and fixed bugs