Pices arrays are now pre-initialized. Fixed a lot of inconsistencies. General code clean-up and project organization.