Implemented feature detection

also added smoke.js for displaying errors