fixed templated reneder bug and refactored views code,added small css to make the home neat