Move functionalities to proper place