Corrected bug in attempting to parse 0 length attributes, converted to JDK 1.7, and cleaned up code.