TSUI-49, cleaned code