fixing js errors, adding styling