Moved different codes to appropriate packages