added specs for the base part of the gem and fixed a lot of bugs