Added comments. Updated to most recent libraries.