Refactor checker to be ready for easy browserfy