pixel formats
consistent coding style
Re-org of main JS file