Adding most source code and tests :)