Organize code

Signed-off-by: Zlatozar Zhelyazkov <zlatozar@gmail.com>