Syntax fix & code cleanup

Code cleanup. Does not tested for run

Signed-off-by: Ivan Bilych <ivan.bilych@gmail.com>