added css, fixed search box alignment, refactored and cleaned up codes