Many bug fixes with structure generation.
Debug system.