Restructured project. Some of the components will now be written using C.

(cherry picked from commit 40e694be6764c0c641d13f2d6a25177ae4340ed0)
Removed old code.

(cherry picked from commit 3fdbaa4c7353065058d1ff754eefc8a406c4a274)