Added function to consolidate getting x, y.
Consolidated getting x, y in common.
Minor updates for comments and pickle process.