Adding some order into the code, still unusable

Signed-off-by: Cristian Maureira-Fredes <cmaurei@aei.mpg.de>