Hitting this mother with a hammer. Almost a total re-write.