Moved block placement out of main and into a function