Remove string manipulation to get rid of cmd etc. Just handle that through a map