Another quick cleanup of the code