rewritten a big part, removed confusing building controller concept