Reworked 48 to optimize it, and some general cleanup