Revert "Revert "First Fit function is up and running, plus other minor changes""

This reverts commit 7b5d1b85fb87aa09b9b3e515abe187b8e486bf09.