Implemented rebuild command (#44)