Reorganized code for cmake compilation.
Updated .gitignore to ignore build files.
Updated README with build instructions.