Rearranged method order to make file more self-documenting