implemented procedures for error-objects

also sorted out the structure of source code files