removed some warnings and added Tests #1