parse declaration added, minor fixes and checks