Tons of fixes and documentation