Added more logic, main scripts and some css styles