Major refactor with scoring added