Fixed the fillbuffer method with correct value checks; Static constants in classes to remove warnings;