99 bottles

This PR commits various bug fixes that were prohibiting the 99 bottles program from running.