Code cleanup. Some methods were changed so that then now return immutable objects