Removed unused variables
Improved the elastic bounce boundaries efficiency