Initial commit of given source.
Comment updates.
Added getters, made some methods more generic.