added invalid styling rules, finished javascript