split styles off into css file and cleaned up code