Big ass commit.

A lot of things changed. Finally at a resonable state again.
Added autogen.sh
removed some unnecessary files