updated the main sketch with proper commenting and some small fixes, for better movement