Cleaned up the bin code - still dont know what it's doing