Added more documentation & tried neatening some stuff up