improved positioning of blocks, refactored the main scene code