Sorry to hear about this. You should definetly contact a MD lawyer ASAP. Since you're out of state, you can probably do a free phone consultation. I offer this. If you can't afford a lawyer, you may be eligible for a public defender.
If you have a clean record, it will likely stay that way based on what you're saying.
I would take the case seriously, but don't panic. Courts are usually lenient in these types of cases.
There are lots of things an attorney can do to protect your record. The best thing to do is take action, and call a lawyer. It will give you some peace of mind.
You should contact an experienced criminal defense attorney as soon as possible. You should discuss with the attorney in what way you were "extremely cooperative." In general, the less said the better since even protestations of innocence may be used as evidence of guilt. Do not post more detailed information about this case on this or any other website. In many jurisdictions, simple possession of small amounts of marijuana can be resolved without creating a permanent record. Don't allow your poor choice of "friends" to affect the remainder of your life. Get an attorney asap. Good luck.
THESE COMMENTS ARE NOT LEGAL ADVICE. They are provided for informational purposes only. Actual legal advice can only be provided after consultation by an attorney licensed in your jurisdiction. Answering this question does not create an attorney-client relationship or otherwise require further consultation.