Fixed Bugs & Improved Code