ignore macos sys files
cleaned up old code and added comments