Refactor: pushed things to appropriate levels to avoid the codez a' leaking.