Code enhancement and unit test framework

some necessary static field and methods are changed. Some parser
enhancements is made. Unit test framework added for unit testing. Some
java code convention applied.