Final changes, added test cases for first five functions, and fixed bugs in setBits and setByte