some PSR2 cleanups, method renames, add regexp in separate file