added debugging of rules for specific way and corrected argument positions in compile.sh
refactoring and tidying up
restored default style