Removed redundant css code, centralized js code