Enabled strict checks and fixed code to comply.

Some essential tidying before any new code should be added.