tonnes of fixes

refactor, added functionality, more stable...