stick to restygwt (cleanup + general structure)