Cleaned a bit. Wrote a bit more doc