Streamlining, bugfixing