Refactor code, add some css styles