Made the code compatible with the compiler at cporta(which probably means GCC compliant). Added tests that don't use the gtest enviroment(they are incomplete).