Refactoring update
Added 'sleep'
Added functions to cast values a little safer