Separated the definitions and implementations of functions.
Added separated implementation files.