Make code more encapsulated