Code refactorization, Home page fixed, few bugs fixed