Big general cleanup of the code
More cleanups everywhere