further refactorings and jackson support