Improved declaration implementation

https://github.com/kfgodel/diamond/issues/33