Implemented the main script, fixed parent constructor.