updating api service
updating css
refactoring the code - main controller