inlined alot of heavily called funcions and changed the include cycles accordingly.