Cleaned up and moved property reading to a separate class