Refactor

A few more changes