Changed perks format

Changed the format used to save perks.
Tested perks parsing.
Preparation to include perks in the repair conditions.
Changed the references so that now the code should be compilable when
forked / clone.