Modified configure.sh (includes all previous commits)

Merged previously proposed commits into a single commit. Added a few minor edits.