Cleanup frontend code. Ref #33