[#54] Complete rewrite