fix configuration bugs and warts
add gitignore file
format code for readability and consistency