starting unifying code
swapping data cache part and other in get_port
finished a template code
fixed bugs and minor changes
fixed bugs and warnings
minimized code changes
fixed a bug in get_port
resolved the conflicts.
removed HEAD stuff.
updated after merge