Resources bugfix & JSHinting code