Moved core framework classes to individual files as appropriate.

Removed disused files: Singleton, Registry.

Minor changes to comments, spacing.

Removed disused demo controller methods.