Initial commit of refactored codebase.

\#fuckhistory.
Remove trash files.
Update some kernel structures.