Small refactor

Small refactor. I will continue, but I want to do it in small steps so you can review and follow what I'm doing.

@solran please review