Cleaned code and added some free blocks