fixed MANIFEST to be the first entry on jar. Cleaned up code for latest capsule resolution.