Fixing some bugs, cleaning documentation, cleaning up code...