Added free space finding. Fixed a lot of bugs while doing it! :D