Implemented some security and some miner functionality