osx updates
refactored database access to use SQLAlchemy