I'll solve both remaining issues with type classes to keep type safety (which is the biggest advantage of the current solution IMHO)