Cleaned up code and used Immutable collections instead of class architecture