Refactor part 2

Signed-off-by: mostua <a.moscicki@stud.elka.pw.edu.pl>