Cleaning up box manager code