Added docs; renamed some things

Should have put less code in this commit