Updated all files and made this work on OS X