added a README to lib dir
fixed typo
networking tests
testing and refactor for database connection
refactor analysis into sample
refactored Sample