Refractor + code-cleanup

- Refractored the entire Core code to CoreFramework which is a seperate
project now.
- Cleaned up some code.