Cleanup in front-end, fix #12