Added if block. Moved connect and moveChildren methods into class Block. New pictures