Syntax + clear

* Fixed more syntax
* Added a clear call to the elements vector when cleaning up.