Rearranged packages and added a protocol handler