added declarations checks, code cleanup, version bump