Trimming

Removing unused code.
reorganising.
Made resizable

Amongst other changes, mainly cosmetic in the code.