Improved dependency checking
Implemented and tested PutS, removed debug messages
Removed debug messages