Separated functionality into modules