updated gitignore to include pyc files
put everything inside of a class and function