Refactored Snow JS