Clean up structure of pages and some code.
Remove some unneeded LOC