refactorings and implementing GET support