Making use macros, there are still problems with ruleparsing (optimize code, strtok..)