Improved type classes and moved interfaces into different folder.