First version of general framework. Utilities finished