Cleaned up commands into separate library