Code cleaning still in progress. Refactoring various classes