First attempt to c migration. Code cleaned up. Some comments added.
Removed unused files.
Cleaned all added comments. Cleaned all the gui remanins from all files.