adding dropout layer and small cleanups