Added several tests, corrected methods