Signed-off-by: Tihomir Gvero <tihomir.gvero@gmail.com>
Lot of refactoring.