Split source files

Source files were split for each separate function. Package internals
requirements were followed.