Refactor code & design