remove unused (and non-working) functions & simplify the rest