Personal scala helper classes and functions