Refactored Cog code to create cog class.
Introduces generated cogscape.