Updated API to handle mouse interactions
Fixed missing variable
Removed old code, added documentation