Readability changes

Introduced some private methods to make more readable

Signed-off-by: Ippoippo <ippoippo_software@ippoippo.net>