Full refactor with skeleton