Getting closer. Drawing all gates but positioning is bad.