Refactor variable names and separate high & low level methods to improve readability