Refactored for using getters; tabs to spaces conversion