Fixed an issue with eclipse and sorted out the file generation again
Tweaked quite a bit of the code, making everything clearer and splitting
up statements more.
Added a rangeStatement and pStatement and used these to define a
pStatement. pStatements still need more work however.