Change code structure; change parameters naming convention