Refactored ST methods
Warned on usage of uninitialized variable
Added an extra test