Added base documentation. Fixed some module bugs.