New decl class implemented, hopefully it will make this all easier