Added ignore for ide files, also tidied up the main binding logic.