Added codegen and code genaration of declarations