add .gitignore
switch to secure random calls
fix 'OSX not defined' error