Much stuff done here. See all of it.

Notes:
On line 47, flansDir cannot be null, so removed check.
On lines 52, 62, incorrect qualification is used. Updated to use this.modpack