Added operation mode and applicaiton mode as mode field in join and accept packet
added applicaiton mode attribute to remote
added main attribute to remote
Persisted main and application attributes
updated tests