Initial setup generator & bugfixing.