Fixed all bugs, started documenting