Removing some relics from copy and paste and adding in proper includes
Removed debugging print and set umask to fix file permissions
Finished implementation of receiving files and bug fixes for checking the correct block number