Refactored main.js
Added slide effect