Better commenting, custom constructor function, new tests