Removed some unnecessary code and wrote a test for the prev_power_of_two
function.