Lots of changes, here we go

I removed old api functions, not-working and not-existing things.Created the main structure.