Merged changes from prototype branch