Implemented Submarine inside the framework

It didn't work properly before.