Simplification; style fix.
Trying to get jslint ignore working properly.
Style fixes.
Improved function order.