Added getters, made some methods more generic.