Refactor Code Layout