Changes to comply with JSlint suggestions