Fixed dependencies, made main more production friendly