Fixed a small bug + cosmetic changes + more docs