Imported changes from staging area; documented code; fixed bug.