Fixed bugs and final touches