Major refactoring based on Cale's branch approach