Divided a function into 2
Moved to a JSDoc-like syntax