cleaned up html styles and better structure to js