Fixed Factory issue + Adding command pattern (WIP)

Fixed Factory issue + Adding command pattern (WIP)