Replace ugly filters with list comprehensions
Clean up compilation