Be patient with yourself. You have talents that are quite useful, but good code design and architecture are rarely thought about in academics. Realize that while you spent 4-6 years getting your PhD, your coworkers were becoming better engineers. That doesn't mean you can't do good work, but for a while you'll mostly be learning from others.