Added validator and changed package structure