[longomatch/test: 5/10] WIP



commit 18ba55326135fb0cdfe87ed79987bb71cd38b376
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Sat Oct 16 19:45:23 2010 +0200

    WIP

 LongoMatch/DB/DataBase.cs                          |   62 ++--
 LongoMatch/DB/Project.cs                           |  466 ++++----------------
 LongoMatch/DB/ProjectDescription.cs                |    9 +-
 LongoMatch/DB/Sections.cs                          |  196 ++-------
 LongoMatch/DB/TeamTemplate.cs                      |   47 ++-
 LongoMatch/Gui/Component/ButtonsWidget.cs          |   10 +-
 LongoMatch/Gui/Component/CategoryProperties.cs     |    6 +-
 LongoMatch/Gui/Component/NotesWidget.cs            |    4 +-
 LongoMatch/Gui/Component/PlayListWidget.cs         |   12 +-
 LongoMatch/Gui/Component/PlayersListTreeWidget.cs  |   23 +-
 LongoMatch/Gui/Component/PlaysListTreeWidget.cs    |   50 +--
 LongoMatch/Gui/Component/ProjectDetailsWidget.cs   |    4 +-
 LongoMatch/Gui/Component/ProjectTemplateWidget.cs  |   52 ++--
 LongoMatch/Gui/Component/TagsTreeWidget.cs         |   22 +-
 LongoMatch/Gui/Component/TimeAdjustWidget.cs       |    2 +-
 LongoMatch/Gui/Component/TimeLineWidget.cs         |   14 +-
 LongoMatch/Gui/Component/TimeScale.cs              |   36 +-
 LongoMatch/Gui/Dialog/DrawingTool.cs               |    4 +-
 LongoMatch/Gui/Dialog/EditCategoryDialog.cs        |   14 +-
 LongoMatch/Gui/Dialog/PlayersSelectionDialog.cs    |   19 +-
 .../Gui/Dialog/ProjectTemplateEditorDialog.cs      |    6 +-
 LongoMatch/Gui/Dialog/TemplatesEditor.cs           |   38 +-
 LongoMatch/Gui/MainWindow.cs                       |   33 +-
 LongoMatch/Gui/TreeView/PlayListTreeView.cs        |    8 +-
 LongoMatch/Handlers/EventsManager.cs               |   94 +++--
 LongoMatch/Handlers/Handlers.cs                    |   26 +-
 LongoMatch/Handlers/HotKeysManager.cs              |   21 +-
 LongoMatch/Handlers/VideoDrawingsManager.cs        |    4 +-
 LongoMatch/IO/CSVExport.cs                         |   22 +-
 LongoMatch/IO/SectionsReader.cs                    |   15 +-
 LongoMatch/IO/SectionsWriter.cs                    |   27 +-
 LongoMatch/LongoMatch.mdp                          |   32 +-
 LongoMatch/Main.cs                                 |    9 +-
 LongoMatch/Playlist/IPlayList.cs                   |   21 +-
 LongoMatch/Playlist/PlayList.cs                    |   30 +-
 LongoMatch/Time/Category.cs                        |  114 +++++
 LongoMatch/Time/MediaTimeNode.cs                   |  367 ---------------
 LongoMatch/Time/PixbufTimeNode.cs                  |   24 -
 LongoMatch/Time/Play.cs                            |  278 ++++++++++++
 .../Time/{PlayListTimeNode.cs => PlayListPlay.cs}  |   37 +--
 LongoMatch/Time/Player.cs                          |  125 ++----
 LongoMatch/Time/SectionsTimeNode.cs                |  165 -------
 LongoMatch/Time/Tag.cs                             |   26 +-
 LongoMatch/Time/TimeNode.cs                        |   54 +--
 LongoMatch/gtk-gui/gui.stetic                      |  199 +---------
 45 files changed, 973 insertions(+), 1854 deletions(-)
---
diff --git a/LongoMatch/DB/DataBase.cs b/LongoMatch/DB/DataBase.cs
index a55f319..65359ed 100644
--- a/LongoMatch/DB/DataBase.cs
+++ b/LongoMatch/DB/DataBase.cs
@@ -49,9 +49,9 @@ namespace LongoMatch.DB
 
 		private Version dbVersion;
 
-		private const int MAYOR=0;
+		private const int MAYOR=1;
 
-		private const int MINOR=1;
+		private const int MINOR=0;
 
 		/// <summary>
 		/// Creates a proxy for the database
@@ -126,36 +126,36 @@ namespace LongoMatch.DB
 					while (result.HasNext()) {
 						try{
 							Project p = (Project)result.Next();
+							ProjectDescription desc = p.Description;
+							db.Activate(desc,3);
 							try{
-								db.Activate(p.File,3);
 								//FIXME: It happens that the project's File object is set to null?¿?¿
 								// In that case, reset the value to let the user change it with the
 								// projects manager.
-								if (p.File.FilePath == null){}							
+								if (desc.File.FilePath == null){}							
 							}catch{
 								MessagePopup.PopupMessage(null, MessageType.Warning, 
-								                          Catalog.GetString("Error retrieving the file info for project:")+" "+p.Title+"\n"+
-								                          Catalog.GetString("This value will be reset. Remember to change it later with the projects manager"));
-								p.File = new PreviewMediaFile(Catalog.GetString("Change Me"),0,0,false,false,"","",0,0,null);
-								db.Store(p);
+								                          Catalog.GetString("Error retrieving the file " +
+								                                            "info for project:")+
+								                          " "+ desc.Title+"\n"+
+								                          Catalog.GetString("This value will be reset. " +
+								                                            "Remember to change it later with the " +
+								                                            "projects manager"));
+								desc.File = new PreviewMediaFile{
+									FilePath = Catalog.GetString("Change Me"),
+									VideoHeight = 0,
+									VideoWidth = 0,
+									HasVideo = false,
+									HasAudio = false,
+									Length = 0,
+									Fps = 0, 
+									VideoCodec = "",
+									AudioCodec = "",
+									Preview = null,
+								};
+									db.Store(p);
 							}
-							ProjectDescription pd = new ProjectDescription {
-								File = p.File.FilePath,
-								LocalName= p.LocalName,
-								VisitorName = p.VisitorName,
-								Season = p.Season,
-								Competition = p.Competition,
-								LocalGoals = p.LocalGoals,
-								VisitorGoals = p.VisitorGoals,
-								MatchDate = p.MatchDate,
-								Preview = p.File.Preview,
-								VideoCodec = p.File.VideoCodec,
-								AudioCodec = p.File.AudioCodec,
-								Length = new Time((int)(p.File.Length/1000)),
-								Format = String.Format("{0}x{1} {2}fps", 
-								                       p.File.VideoWidth, p.File.VideoHeight, p.File.Fps),
-							};
-							list.Add(pd);
+							list.Add(desc);
 						}catch{	
 							Console.WriteLine("Error retreiving project. Skip");
 						}
@@ -209,7 +209,7 @@ namespace LongoMatch.DB
 				IObjectContainer db = Db4oFactory.OpenFile(file);
 				try
 				{
-					if (!this.Exists(project.File.FilePath,db)) {
+					if (!Exists(project.Description.File.FilePath,db)) {
 						db.Store(project);
 						db.Commit();
 					}
@@ -267,7 +267,7 @@ namespace LongoMatch.DB
 				IObjectContainer db = Db4oFactory.OpenFile(file);
 				try	{
 					// We look for a project with the same filename
-					if (!Exists(project.File.FilePath,db)) {
+					if (!Exists(project.Description.File.FilePath,db)) {
 						IQuery query = db.Query();
 						query.Constrain(typeof(Project));
 						query.Descend("file").Descend("filePath").Constrain(previousFileName);
@@ -307,7 +307,7 @@ namespace LongoMatch.DB
 				try	{
 					IQuery query = db.Query();
 					query.Constrain(typeof(Project));
-					query.Descend("file").Descend("filePath").Constrain(project.File.FilePath);
+					query.Descend("file").Descend("filePath").Constrain(project.Description.File.FilePath);
 					IObjectSet result = query.Execute();
 					//Get the stored project and replace it with the new one
 					Project fd = (Project)result.Next();
@@ -334,7 +334,7 @@ namespace LongoMatch.DB
 		public bool Exists(Project project){
 			IObjectContainer db = Db4oFactory.OpenFile(file);
 			try{
-				return Exists(project.File.FilePath, db);
+				return Exists(project.Description.File.FilePath, db);
 			}catch{
 				return false;
 			}finally{
@@ -349,7 +349,7 @@ namespace LongoMatch.DB
 
 		private void SetDeleteCascadeOptions() {
 			Db4oFactory.Configure().ObjectClass(typeof(Project)).CascadeOnDelete(true);
-			Db4oFactory.Configure().ObjectClass(typeof(Sections)).CascadeOnDelete(true);
+			Db4oFactory.Configure().ObjectClass(typeof(Categories)).CascadeOnDelete(true);
 			Db4oFactory.Configure().ObjectClass(typeof(TimeNode)).CascadeOnDelete(true);
 			Db4oFactory.Configure().ObjectClass(typeof(Time)).CascadeOnDelete(true);
 			Db4oFactory.Configure().ObjectClass(typeof(Team)).CascadeOnDelete(true);
@@ -361,7 +361,7 @@ namespace LongoMatch.DB
 
 		private void SetUpdateCascadeOptions() {
 			Db4oFactory.Configure().ObjectClass(typeof(Project)).CascadeOnUpdate(true);
-			Db4oFactory.Configure().ObjectClass(typeof(Sections)).CascadeOnUpdate(true);
+			Db4oFactory.Configure().ObjectClass(typeof(Categories)).CascadeOnUpdate(true);
 			Db4oFactory.Configure().ObjectClass(typeof(TimeNode)).CascadeOnUpdate(true);
 			Db4oFactory.Configure().ObjectClass(typeof(Time)).CascadeOnUpdate(true);
 			Db4oFactory.Configure().ObjectClass(typeof(Team)).CascadeOnUpdate(true);
diff --git a/LongoMatch/DB/Project.cs b/LongoMatch/DB/Project.cs
index a0f2cc3..2a66762 100644
--- a/LongoMatch/DB/Project.cs
+++ b/LongoMatch/DB/Project.cs
@@ -19,6 +19,7 @@
 //
 
 using System;
+using System.Linq;
 using System.IO;
 using System.Collections;
 using System.Collections.Generic;
@@ -27,6 +28,7 @@ using System.Runtime.Serialization.Formatters.Binary;
 using Gtk;
 using Gdk;
 using Mono.Unix;
+using LongoMatch.Common;
 using LongoMatch.TimeNodes;
 using LongoMatch.Video.Utils;
 
@@ -48,261 +50,50 @@ namespace LongoMatch.DB
 	public class Project : IComparable
 	{
 
-		private PreviewMediaFile file;
 
-		private string title;
+		private List<Play> playsList;
 
-		private string localName;
 
-		private string visitorName;
-
-		private int localGoals;
-
-		private int visitorGoals;
-
-		private DateTime matchDate;
-
-		private string season;
-
-		private string competition;
-
-		private Sections sections;
-
-		private List<List<MediaTimeNode>> sectionPlaysList;
-
-		private TeamTemplate visitorTeamTemplate;
-
-		private TeamTemplate localTeamTemplate;
-		
-		private TagsTemplate tagsTemplate;
-		//Keep this fiel for DB retrocompatibility
-#pragma warning disable 0169
-		private List<MediaTimeNode>[] dataSectionArray;
-#pragma warning restore 0169
-
-		/// <summary>
-		/// Creates a new project
-		/// </summary>
-		/// <param name="file">
-		/// A <see cref="PreviewMediaFile"/>: video file information
-		/// </param>
-		/// <param name="localName">
-		/// A <see cref="System.String"/>: local team's name
-		/// </param>
-		/// <param name="visitorName">
-		/// A <see cref="System.String"/>: visitor team's name
-		/// </param>
-		/// <param name="season">
-		/// A <see cref="System.String"/>: season information
-		/// </param>
-		/// <param name="competition">
-		/// A <see cref="System.String"/>: competition information
-		/// </param>
-		/// <param name="localGoals">
-		/// A <see cref="System.Int32"/>: local team's goals
-		/// </param>
-		/// <param name="visitorGoals">
-		/// A <see cref="System.Int32"/>: visitor team's goals
-		/// </param>
-		/// <param name="matchDate">
-		/// A <see cref="DateTime"/>: game date
-		/// </param>
-		/// <param name="sections">
-		/// A <see cref="Sections"/>: categories template
-		/// </param>
-		/// <param name="localTeamTemplate">
-		/// A <see cref="TeamTemplate"/>: local team template
-		/// </param>
-		/// <param name="visitorTeamTemplate">
-		/// A <see cref="TeamTemplate"/>: visitor team template
-		/// </param>
 		#region Constructors
-		public Project(PreviewMediaFile file, String localName, String visitorName,
-		               String season, String competition, int localGoals,
-		               int visitorGoals, DateTime matchDate, Sections sections,
-		               TeamTemplate localTeamTemplate, TeamTemplate visitorTeamTemplate) {
-
-			this.file = file;
-			this.localName = localName;
-			this.visitorName = visitorName;
-			this.localGoals = localGoals;
-			this.visitorGoals = visitorGoals;
-			this.matchDate = matchDate;
-			this.season = season;
-			this.competition = competition;
-			this.localTeamTemplate = localTeamTemplate;
-			this.visitorTeamTemplate = visitorTeamTemplate;
-			this.sections = sections;
-			this.sectionPlaysList = new List<List<MediaTimeNode>>();
-
-			for (int i=0;i<sections.Count;i++) {
-				sectionPlaysList.Add(new List<MediaTimeNode>());
-			}
-			
-			this.tagsTemplate = new TagsTemplate();
-			this.Title = file == null ? "" : System.IO.Path.GetFileNameWithoutExtension(this.file.FilePath);
+		public Project(){
+			playsList = new List<Play>();
+			Categories = new Categories();
+			LocalTeamTemplate = new TeamTemplate();
+			VisitorTeamTemplate = new TeamTemplate();
 		}
 		#endregion
 
 		#region Properties
-		/// <value>
-		/// Video File
-		/// </value>
-		public PreviewMediaFile File {
-			get {
-				return file;
-			}
-			set {
-				file=value;
-			}
-		}
-
-		/// <value>
-		/// Project title
-		/// </value>
-		public String Title {
-			get {
-				return title;
-			}
-			set {
-				title=value;
-			}
-		}
-
-		/// <value>
-		/// Season description
-		/// </value>
-		public String Season {
-			get {
-				return season;
-			}
-			set {
-				season = value;
-			}
-		}
-
-		/// <value>
-		/// Competition description
-		/// </value>
-		public String Competition {
-			get {
-				return competition;
-			}
-			set {
-				competition= value;
-			}
-		}
-
-		/// <value>
-		/// Local team name
-		/// </value>
-		public String LocalName {
-			get {
-				return localName;
-			}
-			set {
-				localName=value;
-			}
-		}
-
-		/// <value>
-		/// Visitor team name
-		/// </value>
-		public String VisitorName {
-			get {
-				return visitorName;
-			}
-			set {
-				visitorName=value;
-			}
-		}
-
-		/// <value>
-		/// Local team goals
-		/// </value>
-		public int LocalGoals {
-			get {
-				return localGoals;
-			}
-			set {
-				localGoals=value;
-			}
-		}
-
-		/// <value>
-		/// Visitor team goals
-		/// </value>
-		public int VisitorGoals {
-			get {
-				return visitorGoals;
-			}
-			set {
-				visitorGoals=value;
-			}
-		}
-
-		/// <value>
-		/// Game date
-		/// </value>
-		public DateTime MatchDate {
-			get {
-				return matchDate;
-			}
-			set {
-				matchDate=value;
-			}
+		
+		public ProjectDescription Description {
+			get;
+			set;
 		}
 
 		/// <value>
 		/// Categories template
 		/// </value>
-		public Sections Sections {
-			get {
-				return this.sections;
-			}
-			set {
-				this.sections = value;
-			}
+		public Categories Categories {
+			get;
+			set;
 		}
 
 		/// <value>
 		/// Local team template
 		/// </value>
 		public TeamTemplate LocalTeamTemplate {
-			get {
-				return localTeamTemplate;
-			}
-			set {
-				localTeamTemplate=value;
-			}
+			get;
+			set;
 		}
 
 		/// <value>
 		/// Visitor team template
 		/// </value>
 		public TeamTemplate VisitorTeamTemplate {
-			get {
-				return visitorTeamTemplate;
-			}
-			set {
-				visitorTeamTemplate=value;
-			}
+			get;
+			set;
 		}
 		
-		/// <value>
-		/// Template with the project tags
-		/// </value>
-		public TagsTemplate Tags{
-			//Since 0.15.5
-			get{
-				if (tagsTemplate == null)
-					tagsTemplate = new TagsTemplate();
-				return tagsTemplate;
-			}
-			set{
-				tagsTemplate = value;
-			}
-		}
 		#endregion
 
 		#region Public Methods
@@ -310,42 +101,12 @@ namespace LongoMatch.DB
 		/// Frees all the project's resources helping the GC
 		/// </summary>
 		public void Clear() {
-			//Help the GC freeing objects
-			foreach (List<MediaTimeNode> list in sectionPlaysList)
-				list.Clear();
-			sectionPlaysList.Clear();
-			Sections.Clear();
-			visitorTeamTemplate.Clear();
-			localTeamTemplate.Clear();
-			sectionPlaysList=null;
-			Sections=null;
-			visitorTeamTemplate=null;
-			localTeamTemplate=null;
+			playsList.Clear();
+			Categories.Clear();
+			VisitorTeamTemplate.Clear();
+			LocalTeamTemplate.Clear();
 		}
 
-		/// <summary>
-		/// Adds a new analysis category to the project
-		/// </summary>
-		/// <param name="tn">
-		/// A <see cref="SectionsTimeNode"/>
-		/// </param>
-		public void AddSection(SectionsTimeNode tn) {
-			AddSectionAtPos(tn,sections.Count);
-		}
-
-		/// <summary>
-		/// Add a new category to the project at a given position
-		/// </summary>
-		/// <param name="tn">
-		/// A <see cref="SectionsTimeNode"/>: category default values
-		/// </param>
-		/// <param name="sectionIndex">
-		/// A <see cref="System.Int32"/>: position index
-		/// </param>
-		public void AddSectionAtPos(SectionsTimeNode tn,int sectionIndex) {
-			sectionPlaysList.Insert(sectionIndex,new List<MediaTimeNode>());
-			sections.AddSectionAtPos(tn,sectionIndex);
-		}
 
 		/// <summary>
 		/// Adds a new play to a given category
@@ -365,17 +126,24 @@ namespace LongoMatch.DB
 		/// <returns>
 		/// A <see cref="MediaTimeNode"/>: created play
 		/// </returns>
-		public MediaTimeNode AddTimeNode(int dataSection, Time start, Time stop,Pixbuf thumbnail) {
-			MediaTimeNode tn ;
-			List<MediaTimeNode> playsList= sectionPlaysList[dataSection];
+		public Play AddPlay(Category category, Time start, Time stop,Pixbuf miniature) {
 			string count= String.Format("{0:000}",playsList.Count+1);
-			string name = sections.GetName(dataSection) + " " + count;
+			string name = String.Format("{0} \" \" {1}",category.Name, count);
 			// HACK: Used for capture where fps is not specified, asuming PAL 25fps
-			ushort fps = file != null ? file.Fps : (ushort)25;
-
-			tn = new MediaTimeNode(name, start, stop,"",fps,thumbnail);
-			playsList.Add(tn);
-			return tn;
+			ushort fps = Description.File != null ? Description.File.Fps : (ushort)25;
+
+			var play = new Play {
+				Name = name,
+				Start = start,
+				Stop = stop,
+				Category = category,
+				Team = Team.NONE,
+				Notes = "",
+				Miniature = miniature,
+				Fps = fps,
+			};
+			playsList.Add(play);
+			return play;
 		}
 
 		/// <summary>
@@ -387,8 +155,8 @@ namespace LongoMatch.DB
 		/// <param name="section">
 		/// A <see cref="System.Int32"/>: category the play belongs to
 		/// </param>
-		public void DeleteTimeNode(MediaTimeNode tNode,int section) {
-			sectionPlaysList[section].Remove(tNode);
+		public void RemovePlay(Play play) {
+			playsList.Remove(play);
 		}
 
 		/// <summary>
@@ -397,43 +165,19 @@ namespace LongoMatch.DB
 		/// <param name="sectionIndex">
 		/// A <see cref="System.Int32"/>: category index
 		/// </param>
-		public void DeleteSection(int sectionIndex) {
-			if (sections.Count == 1)
+		public void RemoveCategory(Category category) {
+			if (Categories.Count == 1)
 				throw new Exception("You can't remove the last Section");
-			sections.RemoveSection(sectionIndex);
-			sectionPlaysList.RemoveAt(sectionIndex);
-		}
-
-		/// <summary>
-		/// Return an array of strings with the categories names
-		/// </summary>
-		/// <returns>
-		/// A <see cref="System.String"/>
-		/// </returns>
-		public string[] GetSectionsNames() {
-			return sections.GetSectionsNames();
-		}
-
-		/// <summary>
-		/// Return an array of <see cref="LongoMatch.TimeNodes.Time"/> with
-		/// the categories default lead time
-		/// </summary>
-		/// <returns>
-		/// A <see cref="Time"/>
-		/// </returns>
-		public Time[] GetSectionsStartTimes() {
-			return sections.GetSectionsStartTimes();
-		}
-
-		/// <summary>
-		/// Return an array of <see cref="LongoMatch.TimeNodes.Time"/> with
-		/// the categories default lag time
-		/// </summary>
-		/// <returns>
-		/// A <see cref="Time"/>
-		/// </returns>
-		public Time[] GetSectionsStopTimes() {
-			return sections.GetSectionsStopTimes();
+			Categories.RemoveCategory(category);
+			
+			/* query for all the plays with this Category */
+			var plays = 
+				from play in playsList
+					where play.Category == category
+					select play;
+			/* Delete them */
+			foreach (var play in playsList)
+				playsList.Remove(play);
 		}
 
 		/// <summary>
@@ -444,11 +188,15 @@ namespace LongoMatch.DB
 		/// A <see cref="TreeStore"/>
 		/// </returns>
 		public TreeStore GetModel() {
-			Gtk.TreeStore dataFileListStore = new Gtk.TreeStore(typeof(MediaTimeNode));
-			for (int i=0;i<sections.Count;i++) {
-				Gtk.TreeIter iter = dataFileListStore.AppendValues(sections.GetTimeNode(i));
-				foreach (MediaTimeNode tNode in sectionPlaysList[i]) {
-					dataFileListStore.AppendValues(iter,tNode);
+			Gtk.TreeStore dataFileListStore = new Gtk.TreeStore(typeof(Play));
+			IEnumerable<IGrouping<Category, Play>> queryPlaysByCategory = 
+				from play in playsList
+					group play by play.Category;
+			
+			foreach (var playsGroup in queryPlaysByCategory) {
+				Gtk.TreeIter iter = dataFileListStore.AppendValues(playsGroup.Key);
+				foreach (Play play in playsGroup) {
+					dataFileListStore.AppendValues(iter,play);
 				}
 			}
 			return dataFileListStore;
@@ -462,26 +210,7 @@ namespace LongoMatch.DB
 		/// A <see cref="TreeStore"/>
 		/// </returns>
 		public TreeStore GetLocalTeamModel() {
-			List<TreeIter> itersList = new List<TreeIter>();
-			Gtk.TreeStore dataFileListStore = new Gtk.TreeStore(typeof(object));
-			
-			itersList.Capacity = localTeamTemplate.PlayersCount;
-			for (int i=0;i<localTeamTemplate.PlayersCount;i++) {
-				Player p = localTeamTemplate.GetPlayer(i);
-				if (p.Discarded)
-					itersList.Insert(i, TreeIter.Zero);
-				else
-					itersList.Insert(i, dataFileListStore.AppendValues(p));
-			}
-			for (int i=0;i<sections.Count;i++) {
-				foreach (MediaTimeNode tNode in sectionPlaysList[i]) {
-					foreach (int player in tNode.LocalPlayers){
-						if (itersList[player].Stamp != TreeIter.Zero.Stamp)
-							dataFileListStore.AppendValues(itersList[player],tNode);
-					}
-				}
-			}
-			return dataFileListStore;
+			return GetTeamModel(LocalTeamTemplate);
 		}
 
 		/// <summary>
@@ -492,49 +221,20 @@ namespace LongoMatch.DB
 		/// A <see cref="TreeStore"/>
 		/// </returns>
 		public TreeStore GetVisitorTeamModel() {
-			List<TreeIter> itersList = new List<TreeIter>();
-			Gtk.TreeStore dataFileListStore = new Gtk.TreeStore(typeof(object));
-			
-			itersList.Capacity = visitorTeamTemplate.PlayersCount;
-			for (int i=0;i<visitorTeamTemplate.PlayersCount;i++) {
-				Player p = visitorTeamTemplate.GetPlayer(i);
-				if (p.Discarded)
-					itersList.Insert(i, TreeIter.Zero);
-				else
-					itersList.Insert(i, dataFileListStore.AppendValues(p));
-			}
-			for (int i=0;i<sections.Count;i++) {
-				foreach (MediaTimeNode tNode in sectionPlaysList[i]) {
-					foreach (int player in tNode.VisitorPlayers){
-						if (itersList[player].Stamp != TreeIter.Zero.Stamp)
-							dataFileListStore.AppendValues(itersList[player],tNode);
-					}
-				}
-			}
-			return dataFileListStore;
-		}
-
-		/// <summary>
-		/// Returns a list of plays' lists. Actually used by the timeline
-		/// </summary>
-		/// <returns>
-		/// A <see cref="List"/>
-		/// </returns>
-		public List<List<MediaTimeNode>> GetDataArray() {
-			return sectionPlaysList;
+			return GetTeamModel(VisitorTeamTemplate);
 		}
 
 		public bool Equals(Project project) {
 			if (project == null)
 				return false;
 			else
-				return this.File.FilePath.Equals(project.File.FilePath);
+				return Description.File.FilePath.Equals(project.Description.File.FilePath);
 		}
 
 		public int CompareTo(object obj) {
 			if (obj is Project) {
 				Project project = (Project) obj;
-				return this.File.FilePath.CompareTo(project.File.FilePath);
+				return Description.File.FilePath.CompareTo(project.Description.File.FilePath);
 			}
 			else
 				throw new ArgumentException("object is not a Project and cannot be compared");
@@ -543,23 +243,47 @@ namespace LongoMatch.DB
 		public static void Export(Project project, string file) {
 			file = Path.ChangeExtension(file,"lpr");
 			IFormatter formatter = new BinaryFormatter();
-			using(Stream stream = new FileStream(file, FileMode.Create, FileAccess.Write, FileShare.None)){
-				formatter.Serialize(stream, project);			
-			}
+			using(Stream stream = new FileStream(file, FileMode.Create, 
+			                                     FileAccess.Write, FileShare.None))
+				formatter.Serialize(stream, project);
 		}
 		
 		public static Project Import(string file) {
-			using(Stream stream = new FileStream(file, FileMode.Open, FileAccess.Read, FileShare.None))
+			using(Stream stream = new FileStream(file, FileMode.Open, 
+			                                     FileAccess.Read, FileShare.None))
 			{
 				try {
 					IFormatter formatter = new BinaryFormatter();
 					return (Project)formatter.Deserialize(stream);
 				}
 				catch {
-					throw new Exception(Catalog.GetString("The file you are trying to load is not a valid project"));
+					throw new Exception(Catalog.GetString("The file you are trying to load " +
+						"is not a valid project"));
 				}
 			}			
 		}		
 		#endregion
+		
+		#region Private Methods
+		
+		private TreeStore GetTeamModel(TeamTemplate team){
+			var dataFileListStore = new Gtk.TreeStore(typeof(object));
+			
+			/* For all the players in the team */
+			foreach (var player in team.PlayersList){
+				/* Add a root in the tree with the player */
+				var iter = dataFileListStore.AppendValues(player);
+				/* Query the plays where this player is in the list of players*/
+				var queryByPlayers = 
+					from play in playsList
+						where play.HasPlayer(player) == true 
+						select play;
+				/* Then add as children of the Player in the tree */
+				foreach (var play in queryByPlayers)
+					dataFileListStore.AppendValues(iter, play);
+			}
+			return dataFileListStore;
+		}
+		#endregion
 	}
 }
diff --git a/LongoMatch/DB/ProjectDescription.cs b/LongoMatch/DB/ProjectDescription.cs
index 19a5cdf..725287f 100644
--- a/LongoMatch/DB/ProjectDescription.cs
+++ b/LongoMatch/DB/ProjectDescription.cs
@@ -19,6 +19,7 @@
 using System;
 using Gdk;
 using LongoMatch.TimeNodes;
+using LongoMatch.Video.Utils;
 
 namespace LongoMatch.DB
 {
@@ -36,7 +37,7 @@ namespace LongoMatch.DB
 			}
 		}
 
-		public String File {
+		public PreviewMediaFile File {
 			get;
 			set;
 		}
@@ -98,8 +99,10 @@ namespace LongoMatch.DB
 		}
 		
 		public String Format {
-			get;
-			set;
+			get{
+				String.Format("{0}x{1} {2}fps", 
+				              File.VideoWidth, File.VideoHeight, File.Fps);
+			}
 		}
 
 		public int CompareTo(object obj) {
diff --git a/LongoMatch/DB/Sections.cs b/LongoMatch/DB/Sections.cs
index 5a29b16..31d371d 100644
--- a/LongoMatch/DB/Sections.cs
+++ b/LongoMatch/DB/Sections.cs
@@ -19,6 +19,7 @@
 //
 using System;
 using System.Collections.Generic;
+using System.Linq;
 using Gdk;
 using LongoMatch.TimeNodes;
 
@@ -34,52 +35,34 @@ namespace LongoMatch.DB
 	/// The <see cref="LongoMatch.DB.Project"/> must handle all the changes
 	/// </summary>
 	[Serializable]
-	public class Sections
+	public class Categories
 	{
-		private List<SectionsTimeNode> sectionsList;
+		private List<Category> categoriesList;
 
-		//These fields are not used but must be kept for DataBase compatiblity
-#pragma warning disable 0169
-		private Color[] colorsArray;
-		private SectionsTimeNode[] timeNodesArray;
-#pragma warning restore 0169
 
 		/// <summary>
 		/// Creates a new template
 		/// </summary>
-		public Sections()
+		public Categories()
 		{
-			this.sectionsList = new List<SectionsTimeNode>();
+			categoriesList = new List<Category>();
 		}
 
 		/// <summary>
 		/// Clear the template
 		/// </summary>
 		public void Clear() {
-			sectionsList.Clear();
+			categoriesList.Clear();
 		}
 
 		/// <summary>
 		/// Adds a new analysis category to the template
 		/// </summary>
 		/// <param name="tn">
-		/// A <see cref="SectionsTimeNode"/>: category to add
+		/// A <see cref="Category"/>: category to add
 		/// </param>
-		public void AddSection(SectionsTimeNode tn) {
-			sectionsList.Add(tn);
-		}
-
-		/// <summary>
-		/// Adds a new category to the template at a given position
-		/// </summary>
-		/// <param name="tn">
-		/// A <see cref="SectionsTimeNode"/>: category to add
-		/// </param>
-		/// <param name="index">
-		/// A <see cref="System.Int32"/>: position
-		/// </param>
-		public void AddSectionAtPos(SectionsTimeNode tn, int index) {
-			sectionsList.Insert(index,tn);
+		public void AddCategory(Category category) {
+			categoriesList.Add(category);
 		}
 
 		/// <summary>
@@ -88,8 +71,8 @@ namespace LongoMatch.DB
 		/// <param name="index">
 		/// A <see cref="System.Int32"/>: position of the category to delete
 		/// </param>
-		public void RemoveSection(int index) {
-			sectionsList.RemoveAt(index);
+		public void RemoveCategory(Category category) {
+			categoriesList.Remove(category);
 		}
 
 		//// <value>
@@ -97,20 +80,20 @@ namespace LongoMatch.DB
 		/// </value>
 		public int Count {
 			get {
-				return sectionsList.Count;
+				return categoriesList.Count;
 			}
 		}
 
 		//// <value>
 		/// Ordered list with all the categories
 		/// </value>
-		public List<SectionsTimeNode> SectionsTimeNodes {
+		public List<Category> CategoriesList {
 			set {
-				sectionsList.Clear();
-				sectionsList = value;
+				categoriesList.Clear();
+				categoriesList = value;
 			}
 			get {
-				return sectionsList;
+				return categoriesList;
 			}
 		}
 
@@ -123,8 +106,8 @@ namespace LongoMatch.DB
 		/// <returns>
 		/// A <see cref="SectionsTimeNode"/>: category retrieved
 		/// </returns>
-		public SectionsTimeNode GetSection(int section) {
-			return sectionsList[section];
+		public Category GetCategoryAtPos(int pos) {
+			return categoriesList[pos];
 		}
 
 		/// <summary>
@@ -133,15 +116,10 @@ namespace LongoMatch.DB
 		/// <returns>
 		/// A <see cref="System.String"/>
 		/// </returns>
-		public string[] GetSectionsNames() {
-			int count = sectionsList.Count;
-			string[] names = new string[count];
-			SectionsTimeNode tNode;
-			for (int i=0; i<count; i++) {
-				tNode = sectionsList[i];
-				names[i]=tNode.Name;
-			}
-			return names;
+		public List<string> GetSectionsNames() {
+			return (from c in categoriesList
+			        orderby c.Position
+			        select c.Name).ToList();
 		}
 
 		/// <summary>
@@ -150,15 +128,10 @@ namespace LongoMatch.DB
 		/// <returns>
 		/// A <see cref="Color"/>
 		/// </returns>
-		public Color[] GetColors() {
-			int count = sectionsList.Count;
-			Color[] colors = new Color[count];
-			SectionsTimeNode tNode;
-			for (int i=0; i<count; i++) {
-				tNode = sectionsList[i];
-				colors[i]=tNode.Color;
-			}
-			return colors;
+		public List<Color> GetColors() {
+			return (from c in categoriesList
+			        orderby c.Position
+			        select c.Color).ToList();
 		}
 
 		/// <summary>
@@ -167,15 +140,10 @@ namespace LongoMatch.DB
 		/// <returns>
 		/// A <see cref="HotKey"/>
 		/// </returns>
-		public HotKey[] GetHotKeys() {
-			int count = sectionsList.Count;
-			HotKey[] hotkeys = new HotKey[count];
-			SectionsTimeNode tNode;
-			for (int i=0; i<count; i++) {
-				tNode = sectionsList[i];
-				hotkeys[i]=tNode.HotKey;
-			}
-			return hotkeys;
+		public List<HotKey> GetHotKeys() {
+			return (from c in categoriesList
+			        orderby c.Position
+			        select c.HotKey).ToList();
 		}
 
 		/// <summary>
@@ -184,15 +152,10 @@ namespace LongoMatch.DB
 		/// <returns>
 		/// A <see cref="Time"/>
 		/// </returns>
-		public Time[] GetSectionsStartTimes() {
-			int count = sectionsList.Count;
-			Time[] startTimes = new Time[count];
-			SectionsTimeNode tNode;
-			for (int i=0; i<count; i++) {
-				tNode = sectionsList[i];
-				startTimes[i]=tNode.Start;
-			}
-			return startTimes;
+		public List<Time> GetSectionsStartTimes() {
+			return (from c in categoriesList
+			        orderby c.Position
+			        select c.Start).ToList();
 		}
 
 		/// <summary>
@@ -201,93 +164,10 @@ namespace LongoMatch.DB
 		/// <returns>
 		/// A <see cref="Time"/>
 		/// </returns>
-		public Time[] GetSectionsStopTimes() {
-			int count = sectionsList.Count;
-			Time[] stopTimes = new Time[count];
-			SectionsTimeNode tNode;
-			for (int i=0; i<count; i++) {
-				tNode = sectionsList[i];
-				stopTimes[i]=tNode.Start;
-			}
-			return stopTimes;
-		}
-
-		/// <summary>
-		/// Returns a category at a given position
-		/// </summary>
-		/// <param name="section">
-		/// A <see cref="System.Int32"/>: position in the list
-		/// </param>
-		/// <returns>
-		/// A <see cref="SectionsTimeNode"/>
-		/// </returns>
-		public SectionsTimeNode GetTimeNode(int section) {
-			return sectionsList [section];
-		}
-
-		/// <summary>
-		/// Returns the name for a category at a given position
-		/// </summary>
-		/// <param name="section">
-		/// A <see cref="System.Int32"/>: position in the list
-		/// </param>
-		/// <returns>
-		/// A <see cref="System.String"/>: name of the category
-		/// </returns>
-		public string GetName(int section) {
-			return sectionsList[section].Name;
-		}
-
-		/// <summary>
-		/// Returns the start time for a category at a given position
-		/// </summary>
-		/// <param name="section">
-		/// A <see cref="System.Int32"/>: position in the list
-		/// </param>
-		/// <returns>
-		/// A <see cref="Time"/>: start time
-		/// </returns>
-		public Time GetStartTime(int section) {
-			return sectionsList[section].Start;
-		}
-
-		/// <summary>
-		/// Returns the stop time for a category at a given position
-		/// </summary>
-		/// <param name="section">
-		/// A <see cref="System.Int32"/>: position in the list
-		/// </param>
-		/// <returns>
-		/// A <see cref="Time"/>: stop time
-		/// </returns>
-		public Time GetStopTime(int section) {
-			return sectionsList[section].Stop;
-		}
-
-		/// <summary>
-		/// Return the color for a category at a given position
-		/// </summary>
-		/// <param name="section">
-		/// A <see cref="System.Int32"/>: position in the list
-		/// </param>
-		/// <returns>
-		/// A <see cref="Color"/>: color
-		/// </returns>
-		public Color GetColor(int section) {
-			return sectionsList[section].Color;
-		}
-
-		/// <summary>
-		/// Returns the hotckey for a category at a given position
-		/// </summary>
-		/// <param name="section">
-		/// A <see cref="System.Int32"/>: position in the list
-		/// </param>
-		/// <returns>
-		/// A <see cref="HotKey"/>: hotkey for this category
-		/// </returns>
-		public HotKey GetHotKey(int section) {
-			return sectionsList[section].HotKey;
+		public List<Time> GetSectionsStopTimes() {
+			return (from c in categoriesList
+			        orderby c.Position
+			        select c.Stop).ToList();
 		}
 	}
 }
diff --git a/LongoMatch/DB/TeamTemplate.cs b/LongoMatch/DB/TeamTemplate.cs
index 37874be..67c4842 100644
--- a/LongoMatch/DB/TeamTemplate.cs
+++ b/LongoMatch/DB/TeamTemplate.cs
@@ -22,6 +22,7 @@ using System.IO;
 using System.Runtime.Serialization;
 using System.Runtime.Serialization.Formatters.Binary;
 using LongoMatch.TimeNodes;
+using LongoMatch.Common;
 
 namespace LongoMatch.DB
 {
@@ -34,6 +35,16 @@ namespace LongoMatch.DB
 		public TeamTemplate() {
 			playersList = new List<Player>();
 		}
+		
+		public Team TeamName{
+			get;
+			set;
+		}
+
+		public List<Player> PlayersList{
+			set;
+			get;
+		}
 
 		public void Clear() {
 			playersList.Clear();
@@ -45,31 +56,10 @@ namespace LongoMatch.DB
 			}
 		}
 
-		public void CreateDefaultTemplate(int playersCount) {
-			for (int i=0; i<playersCount;i++) {
-				playersList.Add(new Player("Player "+i, new DateTime(),"", 0,0,"",i,null, false));
-			}
-		}
-
 		public void AddPlayer(Player player) {
 			playersList.Add(player);
 		}
 
-		public void SetPlayersList(List<Player> playersList) {
-			this.playersList = playersList;
-		}
-
-		public Player GetPlayer(int index) {
-			if (index >= PlayersCount)
-				throw new Exception(String.Format("The actual team template doesn't have so many players. Requesting player {0} but players count is {1}",
-				                                  index, PlayersCount));
-			return playersList[index];
-		}
-
-		public List<Player> GetPlayersList() {
-			return playersList;
-		}
-
 		public void Save(string filepath) {
 			IFormatter formatter = new BinaryFormatter();
 			Stream stream = new FileStream(filepath, FileMode.Create, FileAccess.Write, FileShare.None);
@@ -90,5 +80,20 @@ namespace LongoMatch.DB
 			defaultTemplate.CreateDefaultTemplate(playersCount);
 			return defaultTemplate;
 		}
+		
+		private void CreateDefaultTemplate(int playersCount) {
+			for (int i=0; i<playersCount;i++) {
+				playersList.Add(new Player{
+					Name = "Player " + i,
+					Birthday = new DateTime(),
+					Height = 1.80,
+					Weight = 80,
+					Number = 0,
+					Position = "",
+					Photo = null,
+					Playing = true,
+				});
+			}
+		}
 	}
 }
diff --git a/LongoMatch/Gui/Component/ButtonsWidget.cs b/LongoMatch/Gui/Component/ButtonsWidget.cs
index 57682e3..df9bab6 100644
--- a/LongoMatch/Gui/Component/ButtonsWidget.cs
+++ b/LongoMatch/Gui/Component/ButtonsWidget.cs
@@ -33,7 +33,7 @@ namespace LongoMatch.Gui.Component
 	public partial class ButtonsWidget : Gtk.Bin
 	{
 
-		private Sections sections;		
+		private Categories categories;		
 		private TagMode tagMode;
 
 		public event NewMarkEventHandler NewMarkEvent;
@@ -57,13 +57,13 @@ namespace LongoMatch.Gui.Component
 			}
 		}
 
-		public Sections Sections {
+		public Categories Categories {
 			set {
 				foreach (Widget w in table1.AllChildren) {
 					table1.Remove(w);
 					w.Destroy();
 				}
-				sections = value;
+				Categories = value;
 				if (value == null)
 					return;
 
@@ -100,7 +100,7 @@ namespace LongoMatch.Gui.Component
 
 		protected virtual void OnButtonClicked(object sender,  System.EventArgs e)
 		{
-			if (sections == null)
+			if (categories == null)
 				return;
 			Widget w = (Button)sender;
 			if (tagMode == TagMode.Predifined){
@@ -117,7 +117,7 @@ namespace LongoMatch.Gui.Component
 
 		protected virtual void OnStartTagClicked (object sender, System.EventArgs e)
 		{
-			if (sections == null)
+			if (categories == null)
 				return;
 			
 			starttagbutton.Visible = false;
diff --git a/LongoMatch/Gui/Component/CategoryProperties.cs b/LongoMatch/Gui/Component/CategoryProperties.cs
index 41354e3..33d3c1b 100644
--- a/LongoMatch/Gui/Component/CategoryProperties.cs
+++ b/LongoMatch/Gui/Component/CategoryProperties.cs
@@ -28,7 +28,7 @@ using LongoMatch.Gui.Dialog;
 namespace LongoMatch.Gui.Component
 {
 
-	public delegate void HotKeyChangeHandler(HotKey prevHotKey, SectionsTimeNode newSection);
+	public delegate void HotKeyChangeHandler(HotKey prevHotKey, Category newSection);
 
 	[System.ComponentModel.Category("LongoMatch")]
 	[System.ComponentModel.ToolboxItem(true)]
@@ -37,14 +37,14 @@ namespace LongoMatch.Gui.Component
 
 		public event HotKeyChangeHandler HotKeyChanged;
 
-		private SectionsTimeNode stn;
+		private Category stn;
 
 		public CategoryProperties()
 		{
 			this.Build();
 		}
 
-		public SectionsTimeNode Section
+		public Category Section
 		{
 			set {
 				stn = value;
diff --git a/LongoMatch/Gui/Component/NotesWidget.cs b/LongoMatch/Gui/Component/NotesWidget.cs
index 459d336..e4fdbca 100644
--- a/LongoMatch/Gui/Component/NotesWidget.cs
+++ b/LongoMatch/Gui/Component/NotesWidget.cs
@@ -32,7 +32,7 @@ namespace LongoMatch.Gui.Component
 	{
 		public event TimeNodeChangedHandler TimeNodeChanged;
 		TextBuffer buf;
-		MediaTimeNode play;
+		Play play;
 
 		public NotesWidget()
 		{
@@ -42,7 +42,7 @@ namespace LongoMatch.Gui.Component
 
 		}
 
-		public MediaTimeNode Play {
+		public Play Play {
 			set {
 				play = value;
 				Notes = play.Notes;
diff --git a/LongoMatch/Gui/Component/PlayListWidget.cs b/LongoMatch/Gui/Component/PlayListWidget.cs
index e19927f..ca53494 100644
--- a/LongoMatch/Gui/Component/PlayListWidget.cs
+++ b/LongoMatch/Gui/Component/PlayListWidget.cs
@@ -47,7 +47,7 @@ namespace LongoMatch.Gui.Component
 		public event ProgressHandler Progress;
 
 		private PlayerBin player;
-		private PlayListTimeNode plNode;
+		private PlayListPlay plNode;
 		private PlayList playList;
 		private uint timeout;
 		private object lock_node;
@@ -102,14 +102,14 @@ namespace LongoMatch.Gui.Component
 			}
 		}
 
-		public void Add(PlayListTimeNode plNode) {
+		public void Add(PlayListPlay plNode) {
 			if (playList!=null) {
 				Model.AppendValues(plNode);
 				playList.Add(plNode);
 			}
 		}
 
-		public PlayListTimeNode Next() {
+		public PlayListPlay Next() {
 			if (playList.HasNext()) {
 				plNode = playList.Next();
 				playlisttreeview1.Selection.SelectPath(new TreePath(playList.GetCurrentIndex().ToString()));
@@ -180,7 +180,7 @@ namespace LongoMatch.Gui.Component
 				return true;
 			}
 		}
-		private PlayListTimeNode SelectPlayListNode(TreePath path) {
+		private PlayListPlay SelectPlayListNode(TreePath path) {
 
 			plNode = playList.Select(Int32.Parse(path.ToString()));
 			if (PlayListNodeSelected != null && plNode.Valid) {
@@ -275,7 +275,7 @@ namespace LongoMatch.Gui.Component
 				//FIXME:Create a new instance of the video editor until we fix the audio swith enable/disabled
 				LoadEditor();
 				//videoEditor.ClearList();
-				foreach (PlayListTimeNode segment in playList) {
+				foreach (PlayListPlay segment in playList) {
 					if (segment.Valid)
 						videoEditor.AddSegment(segment.MediaFile.FilePath,
 						                       segment.Start.MSeconds,
@@ -322,7 +322,7 @@ namespace LongoMatch.Gui.Component
 			}
 		}
 
-		protected virtual void OnApplyRate(PlayListTimeNode plNode) {
+		protected virtual void OnApplyRate(PlayListPlay plNode) {
 			if (ApplyCurrentRate != null)
 				ApplyCurrentRate(plNode);
 		}
diff --git a/LongoMatch/Gui/Component/PlayersListTreeWidget.cs b/LongoMatch/Gui/Component/PlayersListTreeWidget.cs
index d535e82..11040e0 100644
--- a/LongoMatch/Gui/Component/PlayersListTreeWidget.cs
+++ b/LongoMatch/Gui/Component/PlayersListTreeWidget.cs
@@ -61,8 +61,9 @@ namespace LongoMatch.Gui.Component
 			}
 		}
 
-		public void DeleteTimeNode(MediaTimeNode tNode, int player) {
-			if (template != null) {
+		public void RemovePlay(Play tNode, Player player) {
+			/*if (template != null) {
+				
 				TreeIter iter;
 				TreeStore model = (TreeStore)playerstreeview.Model;
 				model.GetIterFromString(out iter, player.ToString());
@@ -70,7 +71,7 @@ namespace LongoMatch.Gui.Component
 				model.IterChildren(out child, iter);
 				// Searching the TimeNode to remove it
 				while (model.IterIsValid(child)) {
-					MediaTimeNode mtn = (MediaTimeNode) model.GetValue(child,0);
+					Play mtn = (Play) model.GetValue(child,0);
 					if (mtn == tNode) {
 						model.Remove(ref child);
 						break;
@@ -80,19 +81,19 @@ namespace LongoMatch.Gui.Component
 					if (prev.Equals(child))
 						break;
 				}
-			}
+			}*/
 		}
 
 
-		public void AddTimeNode(MediaTimeNode tNode,int  playerindex) {
-			if (template != null) {
+		public void AddPlay(Play play, Player player) {
+			/*if (template != null) {
 				TreeIter iter;
 				TreeStore model = (TreeStore)playerstreeview.Model;
 				model.GetIterFromString(out iter, playerindex.ToString());
 				Player player = (Player)model.GetValue(iter,0);
 				if (template.GetPlayer(playerindex) == player)
 					model.AppendValues(iter,tNode);
-			}
+			}*/
 		}
 
 		public void SetTeam(TeamTemplate template, TreeStore model) {
@@ -115,24 +116,24 @@ namespace LongoMatch.Gui.Component
 			template = null;
 		}
 
-		protected virtual void OnTimeNodeSelected(MediaTimeNode tNode) {
+		protected virtual void OnTimeNodeSelected(Play tNode) {
 			if (TimeNodeSelected != null)
 				TimeNodeSelected(tNode);
 		}
 
-		protected virtual void OnSnapshotSeriesEvent(LongoMatch.TimeNodes.MediaTimeNode tNode)
+		protected virtual void OnSnapshotSeriesEvent(Play tNode)
 		{
 			if (SnapshotSeriesEvent != null)
 				SnapshotSeriesEvent(tNode);
 		}
 
-		protected virtual void OnTimeNodeChanged(LongoMatch.TimeNodes.TimeNode tNode, object val)
+		protected virtual void OnTimeNodeChanged(TimeNode tNode, object val)
 		{
 			if (TimeNodeChanged != null)
 				TimeNodeChanged(tNode, val);
 		}
 
-		protected virtual void OnPlayListNodeAdded(LongoMatch.TimeNodes.MediaTimeNode tNode)
+		protected virtual void OnPlayListNodeAdded(Play tNode)
 		{
 			if (PlayListNodeAdded != null)
 				PlayListNodeAdded(tNode);
diff --git a/LongoMatch/Gui/Component/PlaysListTreeWidget.cs b/LongoMatch/Gui/Component/PlaysListTreeWidget.cs
index 0912017..29999d6 100644
--- a/LongoMatch/Gui/Component/PlaysListTreeWidget.cs
+++ b/LongoMatch/Gui/Component/PlaysListTreeWidget.cs
@@ -57,16 +57,17 @@ namespace LongoMatch.Gui.Component
             treeview.TagPlay += OnTagPlay;
 		}		
 
-		public void DeletePlay(MediaTimeNode play, int section) {
+		public void RemovePlay(Play play, Category category) {
 			if (project != null) {
 				TreeIter iter;
-				TreeStore model = (TreeStore)treeview.Model;
-				model.GetIterFromString(out iter, section.ToString());
 				TreeIter child;
+				
+				var model = (TreeStore)treeview.Model;
+				model.GetIterFromString(out iter, category.Position.ToString());
 				model.IterChildren(out child, iter);
 				// Searching the TimeNode to remove it
 				while (model.IterIsValid(child)) {
-					MediaTimeNode mtn = (MediaTimeNode) model.GetValue(child,0);
+					Play mtn = (Play) model.GetValue(child,0);
 					if (mtn == play) {
 						model.Remove(ref child);
 						break;
@@ -79,25 +80,20 @@ namespace LongoMatch.Gui.Component
 			}
 		}
 
-		public void AddPlay(MediaTimeNode play,int  section) {
-			TreeIter sectionIter, playIter;
-			TreePath playPath;
-			TreeStore model;
-			TimeNode stNode;
+		public void AddPlay(Play play) {
+			TreeIter categoryIter;
 			
 			if (project == null)
 			return;
-					
-			model = (TreeStore)treeview.Model;
-			model.GetIterFromString(out sectionIter, section.ToString());
-			stNode = (TimeNode)model.GetValue(sectionIter,0);
-			if (project.Sections.GetTimeNode(section) == stNode){
-				playIter = model.AppendValues(sectionIter,play);
-				playPath = model.GetPath(playIter);
-				treeview.Selection.UnselectAll();				
-				treeview.ExpandToPath(playPath);
-				treeview.Selection.SelectIter(playIter);
-			}
+			
+			var cat = play.Category;
+			var model = (TreeStore)treeview.Model;
+			model.GetIterFromString(out categoryIter, cat.Position.ToString());
+			var playIter = model.AppendValues(categoryIter,play);
+			var playPath = model.GetPath(playIter);
+			treeview.Selection.UnselectAll();				
+			treeview.ExpandToPath(playPath);
+			treeview.Selection.SelectIter(playIter);
 		}
 
 		public bool ProjectIsLive{
@@ -133,35 +129,35 @@ namespace LongoMatch.Gui.Component
 				TimeNodeChanged(tNode,val);
 		}
 
-		protected virtual void OnTimeNodeSelected(MediaTimeNode tNode) {
+		protected virtual void OnTimeNodeSelected(Play tNode) {
 			if (TimeNodeSelected != null)
 				TimeNodeSelected(tNode);
 		}
 
-		protected virtual void OnTimeNodeDeleted(MediaTimeNode tNode, int section) {
+		protected virtual void OnTimeNodeDeleted(Play tNode, Category category){
 			if (TimeNodeDeleted != null)
-				TimeNodeDeleted(tNode,section);
+				TimeNodeDeleted(tNode, category);
 		}
 
-		protected virtual void OnPlayListNodeAdded(MediaTimeNode tNode)
+		protected virtual void OnPlayListNodeAdded(Play tNode)
 		{
 			if (PlayListNodeAdded != null)
 				PlayListNodeAdded(tNode);
 		}
 
-		protected virtual void OnSnapshotSeriesEvent(LongoMatch.TimeNodes.MediaTimeNode tNode)
+		protected virtual void OnSnapshotSeriesEvent(LongoMatch.TimeNodes.Play tNode)
 		{
 			if (SnapshotSeriesEvent != null)
 				SnapshotSeriesEvent(tNode);
 		}
 
-		protected virtual void OnPlayersTagged(LongoMatch.TimeNodes.MediaTimeNode tNode, Team team)
+		protected virtual void OnPlayersTagged(LongoMatch.TimeNodes.Play tNode, Team team)
 		{
 			if (PlayersTagged != null)
 				PlayersTagged(tNode,team);
 		}
 
-		protected virtual void OnTagPlay (LongoMatch.TimeNodes.MediaTimeNode tNode)
+		protected virtual void OnTagPlay (LongoMatch.TimeNodes.Play tNode)
 		{
 			if (TagPlay != null)
 				TagPlay(tNode);
diff --git a/LongoMatch/Gui/Component/ProjectDetailsWidget.cs b/LongoMatch/Gui/Component/ProjectDetailsWidget.cs
index c88c43d..e96c4f1 100644
--- a/LongoMatch/Gui/Component/ProjectDetailsWidget.cs
+++ b/LongoMatch/Gui/Component/ProjectDetailsWidget.cs
@@ -49,7 +49,7 @@ namespace LongoMatch.Gui.Component
 		private DateTime date;
 		private CalendarPopup cp;
 		private Win32CalendarDialog win32CP;
-		private Sections actualSection;
+		private Categories actualCategory;
 		private TeamTemplate actualVisitorTeam;
 		private TeamTemplate actualLocalTeam;
 		private ProjectType useType;
@@ -187,7 +187,7 @@ namespace LongoMatch.Gui.Component
 			}
 		}
 
-		public Sections Sections {
+		public Category Category {
 			get {
 				return actualSection;
 			}
diff --git a/LongoMatch/Gui/Component/ProjectTemplateWidget.cs b/LongoMatch/Gui/Component/ProjectTemplateWidget.cs
index 31f16ff..853e7fe 100644
--- a/LongoMatch/Gui/Component/ProjectTemplateWidget.cs
+++ b/LongoMatch/Gui/Component/ProjectTemplateWidget.cs
@@ -1,4 +1,4 @@
-// SectionsPropertiesWidget.cs
+// CategoriesPropertiesWidget.cs
 //  Copyright (C) 2007-2009 Andoni Morales Alastruey
 //
 // This program is free software; you can redistribute it and/or modify
@@ -38,8 +38,8 @@ namespace LongoMatch.Gui.Component
 	{
 		private List<HotKey> hkList;
 		private Project project;
-		private Sections sections;
-		private List<SectionsTimeNode> selectedSections;
+		private Categories sections;
+		private List<Categories> selectedCategories;
 		private bool edited = false;
 
 		public ProjectTemplateWidget()
@@ -51,17 +51,17 @@ namespace LongoMatch.Gui.Component
 		public void SetProject(Project project) {
 			this.project = project;
 			if (project != null)
-				Sections=project.Sections;
+				Categories=project.Categories;
 		}
 
-		public Sections Sections {
+		public Categories Categories {
 			get {
 				return sections;
 			}
 			set {
 				this.sections = value;
 				edited = false;
-				Gtk.TreeStore sectionsListStore = new Gtk.TreeStore(typeof(SectionsTimeNode));
+				Gtk.TreeStore sectionsListStore = new Gtk.TreeStore(typeof(Category));
 				hkList.Clear();
 				for (int i=0;i<sections.Count;i++) {
 					sectionsListStore.AppendValues(sections.GetSection(i));
@@ -90,17 +90,17 @@ namespace LongoMatch.Gui.Component
 		}
 
 		private void UpdateModel() {
-			Sections = Sections;
+			Categories = Categories;
 		}
 
 		private void AddSection(int index) {
-			SectionsTimeNode tn;
+			Category tn;
 			HotKey hkey = new HotKey();
 
 			Time start = new Time(10*Time.SECONDS_TO_TIME);
 			Time stop = new Time(10*Time.SECONDS_TO_TIME);
 
-			tn  = new SectionsTimeNode("New Section",start,stop,hkey,new Color(Byte.MaxValue,Byte.MinValue,Byte.MinValue));
+			tn  = new Category("New Section",start,stop,hkey,new Color(Byte.MaxValue,Byte.MinValue,Byte.MinValue));
 
 			if (project != null) {
 				project.AddSectionAtPos(tn,index);
@@ -112,34 +112,34 @@ namespace LongoMatch.Gui.Component
 			edited = true;
 		}
 
-		private void RemoveSelectedSections() {
+		private void RemoveSelectedCategories() {
 			if (project!= null) {
 				MessageDialog dialog = new MessageDialog((Gtk.Window)this.Toplevel,DialogFlags.Modal,MessageType.Question,
 				                ButtonsType.YesNo,true,
 				                Catalog.GetString("You are about to delete a category and all the plays added to this category. Do you want to proceed?"));
 				if (dialog.Run() == (int)ResponseType.Yes){
 					try {
-						foreach (SectionsTimeNode tNode in selectedSections)
-							project.DeleteSection(sections.SectionsTimeNodes.IndexOf(tNode));
+						foreach (Category tNode in selectedCategories)
+							project.DeleteSection(sections.Categorys.IndexOf(tNode));
 					} catch {
 						MessagePopup.PopupMessage(this,MessageType.Warning,
 						                          Catalog.GetString("A template needs at least one category"));
 					}
 				}
 				dialog.Destroy();
-				sections=project.Sections;
+				sections=project.Categories;
 			} else {
-				foreach (SectionsTimeNode tNode in selectedSections){
+				foreach (Category tNode in selectedCategories){
 					if (sections.Count == 1){
 						MessagePopup.PopupMessage(this,MessageType.Warning,
 						                          Catalog.GetString("A template needs at least one category"));
 					} else 
-						sections.RemoveSection(sections.SectionsTimeNodes.IndexOf(tNode));
+						sections.RemoveSection(sections.Categorys.IndexOf(tNode));
 				}
 			}
 			UpdateModel();
 			edited = true;
-			selectedSections = null;
+			selectedCategories = null;
 			ButtonsSensitive=false;
 		}
 
@@ -154,7 +154,7 @@ namespace LongoMatch.Gui.Component
 
 		private void EditSelectedSection() {
 			EditCategoryDialog dialog = new EditCategoryDialog();
-			dialog.Section = selectedSections[0];
+			dialog.Section = selectedCategories[0];
 			dialog.HotKeysList = hkList;
 			dialog.TransientFor = (Gtk.Window) Toplevel;
 			dialog.Run();
@@ -163,33 +163,33 @@ namespace LongoMatch.Gui.Component
 		}
 		
 		private void SaveTemplate(string templateName){
-			SectionsWriter.UpdateTemplate(templateName+".sct", Sections);
+			CategoriesWriter.UpdateTemplate(templateName+".sct", Categories);
 		}
 
 		protected virtual void OnNewAfter(object sender, EventArgs args) {
-			AddSection(sections.SectionsTimeNodes.IndexOf(selectedSections[0])+1);
+			AddSection(sections.Categorys.IndexOf(selectedCategories[0])+1);
 		}
 
 		protected virtual void OnNewBefore(object sender, EventArgs args) {
-			AddSection(sections.SectionsTimeNodes.IndexOf(selectedSections[0]));
+			AddSection(sections.Categorys.IndexOf(selectedCategories[0]));
 		}
 
 		protected virtual void OnRemove(object sender, EventArgs args) {
-			RemoveSelectedSections();
+			RemoveSelectedCategories();
 		}
 
 		protected virtual void OnEdit(object sender, EventArgs args) {
 			EditSelectedSection();
 		}
 
-		protected virtual void OnSectionstreeview1SectionClicked(LongoMatch.TimeNodes.SectionsTimeNode tNode)
+		protected virtual void OnCategoriestreeview1SectionClicked(LongoMatch.TimeNodes.Category tNode)
 		{
 			EditSelectedSection();
 		}
 
-		protected virtual void OnSectionstreeview1SectionsSelected (List<SectionsTimeNode> tNodesList)
+		protected virtual void OnCategoriestreeview1CategoriesSelected (List<Category> tNodesList)
 		{
-			selectedSections = tNodesList;
+			selectedCategories = tNodesList;
 			if (tNodesList.Count == 0)
 				ButtonsSensitive = false;
 			else if (tNodesList.Count == 1){
@@ -205,8 +205,8 @@ namespace LongoMatch.Gui.Component
 
 		protected virtual void OnKeyPressEvent(object o, Gtk.KeyPressEventArgs args)
 		{
-			if (args.Event.Key == Gdk.Key.Delete && selectedSections != null)
-				RemoveSelectedSections();
+			if (args.Event.Key == Gdk.Key.Delete && selectedCategories != null)
+				RemoveSelectedCategories();
 		}
 
 		protected virtual void OnExportbuttonClicked (object sender, System.EventArgs e)
diff --git a/LongoMatch/Gui/Component/TagsTreeWidget.cs b/LongoMatch/Gui/Component/TagsTreeWidget.cs
index a600e6e..e8108ba 100644
--- a/LongoMatch/Gui/Component/TagsTreeWidget.cs
+++ b/LongoMatch/Gui/Component/TagsTreeWidget.cs
@@ -57,7 +57,7 @@ namespace LongoMatch.Gui.Component
 		{
 			this.Build();
 			filterTags = new List<Tag>();
-			model = new Gtk.ListStore(typeof(MediaTimeNode));			
+			model = new Gtk.ListStore(typeof(Play));			
 			filter = new Gtk.TreeModelFilter(model, null);
 			filter.VisibleFunc = new Gtk.TreeModelFilterVisibleFunc(FilterTree);
 			treeview.Model = filter;
@@ -78,12 +78,12 @@ namespace LongoMatch.Gui.Component
 			filter.Refilter();
 		}
 
-		public void DeletePlay(MediaTimeNode play) {
+		public void DeletePlay(Play play) {
 			if (project != null) {
 				TreeIter iter;
 				model.GetIterFirst(out iter);
 				while (model.IterIsValid(iter)) {
-					MediaTimeNode mtn = (MediaTimeNode) model.GetValue(iter,0);
+					Play mtn = (Play) model.GetValue(iter,0);
 					if (mtn == play) {
 						model.Remove(ref iter);
 						break;
@@ -96,7 +96,7 @@ namespace LongoMatch.Gui.Component
 			}
 		}
 
-		public void AddPlay(MediaTimeNode play) {
+		public void AddPlay(Play play) {
 			model.AppendValues(play);
 			filter.Refilter();
 		}
@@ -112,8 +112,8 @@ namespace LongoMatch.Gui.Component
 				project = value;
 				if (project != null) {
 					model.Clear();
-					foreach (List<MediaTimeNode> list in project.GetDataArray()){
-						foreach (MediaTimeNode tNode in list)
+					foreach (List<Play> list in project.GetDataArray()){
+						foreach (Play tNode in list)
 							model.AppendValues(tNode);
 					}
 					UpdateTagsList();
@@ -187,12 +187,12 @@ namespace LongoMatch.Gui.Component
 		
 		private bool FilterTree(Gtk.TreeModel model, Gtk.TreeIter iter)
 		{
-			MediaTimeNode tNode;
+			Play tNode;
 			
 			if (filterTags.Count == 0)
 				return true;
 			
-			tNode = model.GetValue(iter, 0) as MediaTimeNode;
+			tNode = model.GetValue(iter, 0) as Play;
 
 			if (tNode == null)
 				return true;
@@ -217,18 +217,18 @@ namespace LongoMatch.Gui.Component
 				TimeNodeChanged(tNode,val);
 		}
 
-		protected virtual void OnTimeNodeSelected(MediaTimeNode tNode) {
+		protected virtual void OnTimeNodeSelected(Play tNode) {
 			if (TimeNodeSelected != null)
 				TimeNodeSelected(tNode);
 		}
 
-		protected virtual void OnPlayListNodeAdded(MediaTimeNode tNode)
+		protected virtual void OnPlayListNodeAdded(Play tNode)
 		{
 			if (PlayListNodeAdded != null)
 				PlayListNodeAdded(tNode);
 		}
 
-		protected virtual void OnSnapshotSeriesEvent(LongoMatch.TimeNodes.MediaTimeNode tNode)
+		protected virtual void OnSnapshotSeriesEvent(LongoMatch.TimeNodes.Play tNode)
 		{
 			if (SnapshotSeriesEvent != null)
 				SnapshotSeriesEvent(tNode);
diff --git a/LongoMatch/Gui/Component/TimeAdjustWidget.cs b/LongoMatch/Gui/Component/TimeAdjustWidget.cs
index 3884714..7c7075c 100644
--- a/LongoMatch/Gui/Component/TimeAdjustWidget.cs
+++ b/LongoMatch/Gui/Component/TimeAdjustWidget.cs
@@ -38,7 +38,7 @@ namespace LongoMatch.Gui.Component
 			this.Build();
 		}
 
-		public void SetTimeNode(SectionsTimeNode tNode) {
+		public void SetTimeNode(Category tNode) {
 			spinbutton1.Value=tNode.Start.Seconds;
 			spinbutton2.Value=tNode.Stop.Seconds;
 		}
diff --git a/LongoMatch/Gui/Component/TimeLineWidget.cs b/LongoMatch/Gui/Component/TimeLineWidget.cs
index fe2aeaa..f6ab96a 100644
--- a/LongoMatch/Gui/Component/TimeLineWidget.cs
+++ b/LongoMatch/Gui/Component/TimeLineWidget.cs
@@ -39,12 +39,12 @@ namespace LongoMatch.Gui.Component {
 		//public event PlayListNodeAddedHandler PlayListNodeAdded;
 
 		private TimeScale[] tsArray;
-		private List<List<MediaTimeNode>> tnArray;
-		private Sections sections;
+		private List<List<Play>> tnArray;
+		private Categories sections;
 		private TimeReferenceWidget tr;
 		private uint frames;
 		private uint pixelRatio;
-		private MediaTimeNode selected;
+		private Play selected;
 		private uint currentFrame;
 
 
@@ -55,7 +55,7 @@ namespace LongoMatch.Gui.Component {
 			vscale1.CanFocus = false;
 		}
 
-		public MediaTimeNode SelectedTimeNode {
+		public Play SelectedTimeNode {
 			get {
 				return selected;
 			}
@@ -136,7 +136,7 @@ namespace LongoMatch.Gui.Component {
 					return;
 				}
 
-				sections = value.Sections;
+				sections = value.Categories;
 				tnArray = value.GetDataArray();
 				tsArray = new TimeScale[sections.Count];
 
@@ -178,11 +178,11 @@ namespace LongoMatch.Gui.Component {
 				TimeNodeChanged(tn,val);
 		}
 
-		protected virtual void OnTimeNodeSelected(MediaTimeNode tn) {
+		protected virtual void OnTimeNodeSelected(Play tn) {
 			if (TimeNodeSelected != null)
 				TimeNodeSelected(tn);
 		}
-		protected virtual void OnTimeNodeDeleted(MediaTimeNode tn, int section) {
+		protected virtual void OnTimeNodeDeleted(Play tn, int section) {
 			if (TimeNodeDeleted != null)
 				TimeNodeDeleted(tn,section);
 		}
diff --git a/LongoMatch/Gui/Component/TimeScale.cs b/LongoMatch/Gui/Component/TimeScale.cs
index 7d72acc..c16b1f0 100644
--- a/LongoMatch/Gui/Component/TimeScale.cs
+++ b/LongoMatch/Gui/Component/TimeScale.cs
@@ -46,12 +46,12 @@ namespace LongoMatch.Gui.Component
 
 		private int section;
 		private Cairo.Color color;
-		private List<MediaTimeNode> list;
+		private List<Play> list;
 
-		private MediaTimeNode candidateTN;
+		private Play candidateTN;
 		private bool candidateStart;
 		private bool movingLimit;
-		private MediaTimeNode selected=null;
+		private Play selected=null;
 
 		private uint lastTime=0;
 		private uint currentFrame;
@@ -60,7 +60,7 @@ namespace LongoMatch.Gui.Component
 		private Menu menu;
 		private MenuItem delete;
 		private int cursorFrame;
-		private Dictionary<MenuItem,MediaTimeNode> dic;
+		private Dictionary<MenuItem,Play> dic;
 
 		private Pango.Layout layout;
 
@@ -70,7 +70,7 @@ namespace LongoMatch.Gui.Component
 		public event TimeNodeDeletedHandler TimeNodeDeleted;
 
 
-		public TimeScale(int section,List<MediaTimeNode> list, uint frames,Gdk.Color color)
+		public TimeScale(int section,List<Play> list, uint frames,Gdk.Color color)
 		{
 			this.section = section;
 			this.frames = frames;
@@ -81,7 +81,7 @@ namespace LongoMatch.Gui.Component
 			this.color.A = ALPHA;
 			Events = EventMask.PointerMotionMask | EventMask.ButtonPressMask | EventMask.ButtonReleaseMask ;
 
-			dic = new Dictionary<MenuItem,MediaTimeNode>();
+			dic = new Dictionary<MenuItem,Play>();
 
 			layout =  new Pango.Layout(PangoContext);
 			layout.Wrap = Pango.WrapMode.Char;
@@ -112,7 +112,7 @@ namespace LongoMatch.Gui.Component
 			}
 		}
 
-		public MediaTimeNode SelectedTimeNode {
+		public Play SelectedTimeNode {
 			get {
 				return selected;
 			}
@@ -154,16 +154,16 @@ namespace LongoMatch.Gui.Component
 		}
 
 		private void SetMenu() {
-			MenuItem newMediaTimeNode;
+			MenuItem newPlay;
 
 			menu = new Menu();
 			delete = new MenuItem(Catalog.GetString("Delete Play"));
-			newMediaTimeNode = new MenuItem(Catalog.GetString("Add New Play"));
+			newPlay = new MenuItem(Catalog.GetString("Add New Play"));
 
-			menu.Append(newMediaTimeNode);
+			menu.Append(newPlay);
 			menu.Append(delete);
 
-			newMediaTimeNode.Activated += new EventHandler(OnNewMediaTimeNode);
+			newPlay.Activated += new EventHandler(OnNewPlay);
 
 			menu.ShowAll();
 		}
@@ -181,7 +181,7 @@ namespace LongoMatch.Gui.Component
 
 					g.Operator = Operator.Over;
 
-					foreach (MediaTimeNode tn in list) {
+					foreach (Play tn in list) {
 						if (tn != selected) {
 							DrawRoundedRectangle(g,tn.StartFrame/pixelRatio,3,tn.TotalFrames/pixelRatio,height-6,SECTION_HEIGHT/7);
 							g.LineWidth = 2;
@@ -246,7 +246,7 @@ namespace LongoMatch.Gui.Component
 
 		private void DrawTimeNodesName() {
 			lock (locker) {
-				foreach (MediaTimeNode tn in list) {
+				foreach (Play tn in list) {
 					layout.Width = Pango.Units.FromPixels((int)(tn.TotalFrames/pixelRatio));
 					layout.SetMarkup(tn.Name);
 					GdkWindow.DrawLayout(Style.TextGC(StateType.Normal),
@@ -261,7 +261,7 @@ namespace LongoMatch.Gui.Component
 			deleteMenu = new Menu();
 			delete.Submenu=deleteMenu;
 			dic.Clear();
-			foreach (MediaTimeNode tn in list) {
+			foreach (Play tn in list) {
 				//We scan all the time Nodes looking for one matching the cursor selectcio
 				//And we add them to the delete menu
 				if (tn.HasFrame(cursorFrame)) {
@@ -278,7 +278,7 @@ namespace LongoMatch.Gui.Component
 		private void ProcessButton1(EventButton evnt) {
 			if (lastTime != evnt.Time) {
 				candidateTN = null;
-				foreach (MediaTimeNode tn in list) {
+				foreach (Play tn in list) {
 					int pos = (int)(evnt.X*pixelRatio);
 					//Moving from the right side
 					if (Math.Abs(pos-tn.StopFrame) < 3*pixelRatio) {
@@ -304,7 +304,7 @@ namespace LongoMatch.Gui.Component
 			}
 			//On Double Click
 			else {
-				foreach (MediaTimeNode tn in list) {
+				foreach (Play tn in list) {
 					int pos = (int)(evnt.X*pixelRatio);
 					if (TimeNodeSelected!= null && tn.HasFrame(pos)) {
 						TimeNodeSelected(tn);
@@ -314,13 +314,13 @@ namespace LongoMatch.Gui.Component
 			}
 		}
 
-		protected void OnNewMediaTimeNode(object obj, EventArgs args) {
+		protected void OnNewPlay(object obj, EventArgs args) {
 			if (NewMarkAtFrameEvent != null)
 				NewMarkAtFrameEvent(section,cursorFrame);
 		}
 
 		protected void OnDelete(object obj, EventArgs args) {
-			MediaTimeNode tNode;
+			Play tNode;
 			dic.TryGetValue((MenuItem)obj, out tNode);
 			if (TimeNodeDeleted != null && tNode != null) {
 				TimeNodeDeleted(tNode, section);
diff --git a/LongoMatch/Gui/Dialog/DrawingTool.cs b/LongoMatch/Gui/Dialog/DrawingTool.cs
index 51c1a76..2cfd7fa 100644
--- a/LongoMatch/Gui/Dialog/DrawingTool.cs
+++ b/LongoMatch/Gui/Dialog/DrawingTool.cs
@@ -29,7 +29,7 @@ namespace LongoMatch.Gui.Dialog
 
 	public partial class DrawingTool : Gtk.Dialog
 	{
-		private MediaTimeNode play;
+		private Play play;
 		private int stopTime;
 
 		public DrawingTool()
@@ -51,7 +51,7 @@ namespace LongoMatch.Gui.Dialog
 			}
 		}
 
-		public void SetPlay(MediaTimeNode play,int stopTime) {
+		public void SetPlay(Play play,int stopTime) {
 			this.play = play;
 			this.stopTime = stopTime;
 			savetoprojectbutton.Visible = true;
diff --git a/LongoMatch/Gui/Dialog/EditCategoryDialog.cs b/LongoMatch/Gui/Dialog/EditCategoryDialog.cs
index 7d8766a..3e10dc4 100644
--- a/LongoMatch/Gui/Dialog/EditCategoryDialog.cs
+++ b/LongoMatch/Gui/Dialog/EditCategoryDialog.cs
@@ -39,9 +39,9 @@ namespace LongoMatch.Gui.Dialog
 			timenodeproperties2.HotKeyChanged += OnHotKeyChanged;
 		}
 
-		public SectionsTimeNode Section {
+		public Category Category {
 			set {
-				timenodeproperties2.Section = value;
+				timenodeproperties2.Category = value;
 			}
 		}
 
@@ -51,16 +51,16 @@ namespace LongoMatch.Gui.Dialog
 			}
 		}
 
-		protected virtual void OnHotKeyChanged(HotKey prevHotKey,SectionsTimeNode section) {
+		protected virtual void OnHotKeyChanged(HotKey prevHotKey, Category category) {
 			if (hkList.Contains(section.HotKey)) {
 				MessagePopup.PopupMessage(this,MessageType.Warning,
 				                          Catalog.GetString("This hotkey is already in use."));
-				section.HotKey=prevHotKey;
-				timenodeproperties2.Section=section; //Update Gui
+				category.HotKey=prevHotKey;
+				timenodeproperties2.Category = category; //Update Gui
 			}
-			else if (section.HotKey.Defined){
+			else if (category.HotKey.Defined){
 				hkList.Remove(prevHotKey);
-				hkList.Add(section.HotKey);
+				hkList.Add(category.HotKey);
 			}
 		}
 	}
diff --git a/LongoMatch/Gui/Dialog/PlayersSelectionDialog.cs b/LongoMatch/Gui/Dialog/PlayersSelectionDialog.cs
index 84eab28..7d5ce56 100644
--- a/LongoMatch/Gui/Dialog/PlayersSelectionDialog.cs
+++ b/LongoMatch/Gui/Dialog/PlayersSelectionDialog.cs
@@ -29,12 +29,12 @@ namespace LongoMatch.Gui.Dialog
 	public partial class PlayersSelectionDialog : Gtk.Dialog
 	{
 		TeamTemplate template;
-		List<CheckButton> checkButtonsList;
+		Dictionary<CheckButton, Player> checkButtonsDict;
 
 		public PlayersSelectionDialog()
 		{
 			this.Build();
-			checkButtonsList = new List<CheckButton>();
+			checkButtonsDict = new Dictionary<CheckButton, Player>();
 		}
 
 		public void SetPlayersInfo(TeamTemplate template) {
@@ -71,17 +71,16 @@ namespace LongoMatch.Gui.Dialog
 			}
 		}
 
-		public List<int> PlayersChecked {
+		public List<Player> PlayersChecked {
 			set {
-				for (int i=0; i<checkButtonsList.Count; i++)
-					checkButtonsList[i].Active = value.Contains(i);
+				foreach (var pair in checkButtonsDict)
+					pair.Key.Active = value.Contains(pair.Value);
 			}
 			get {
-				List<int> playersList = new List<int>();
-				for (int i=0; i<checkButtonsList.Count; i++) {
-					if (checkButtonsList[i].Active) {
-						playersList.Add(i);
-					}
+				var playersList = new List<Players>();
+				foreach (var pair in checkButtonsDict){
+					if (pair.Key.Active)
+						playersList.Add(pair.Value);
 				}
 				return playersList;
 			}
diff --git a/LongoMatch/Gui/Dialog/ProjectTemplateEditorDialog.cs b/LongoMatch/Gui/Dialog/ProjectTemplateEditorDialog.cs
index 5e41084..efc54ce 100644
--- a/LongoMatch/Gui/Dialog/ProjectTemplateEditorDialog.cs
+++ b/LongoMatch/Gui/Dialog/ProjectTemplateEditorDialog.cs
@@ -40,12 +40,12 @@ namespace LongoMatch.Gui.Dialog
 			}
 		}
 
-		public Sections Sections {
+		public Categories Categories {
 			set {
-				projecttemplatewidget.Sections=value;
+				projecttemplatewidget.Categories =value;
 			}
 			get {
-				return projecttemplatewidget.Sections;
+				return projecttemplatewidget.Categories;
 			}
 		}
 		
diff --git a/LongoMatch/Gui/Dialog/TemplatesEditor.cs b/LongoMatch/Gui/Dialog/TemplatesEditor.cs
index 3cbd481..48954ba 100644
--- a/LongoMatch/Gui/Dialog/TemplatesEditor.cs
+++ b/LongoMatch/Gui/Dialog/TemplatesEditor.cs
@@ -37,12 +37,12 @@ namespace LongoMatch.Gui.Dialog
 
 		public enum UseType {
 			TeamTemplate,
-			SectionsTemplate,
+			CategoriesTemplate,
 		}
 
 
 		private Gtk.ListStore dataFileListStore;
-		private Sections selectedSectionsTemplate;
+		private Categories selectedCategoriesTemplate;
 		private TeamTemplate selectedTeamTemplate;
 		private UseType useType;
 		private string templateName;
@@ -95,10 +95,10 @@ namespace LongoMatch.Gui.Dialog
 			(cell as Gtk.CellRendererText).Text = System.IO.Path.GetFileNameWithoutExtension(_templateFilePath.ToString());
 		}
 
-		public void SetSectionsTemplate(Sections sections) {
-			if (useType != UseType.SectionsTemplate)
+		public void SetCategoriesTemplate(Categories sections) {
+			if (useType != UseType.CategoriesTemplate)
 				return;
-			sectionspropertieswidget1.Sections=sections;
+			sectionspropertieswidget1.Categories=sections;
 		}
 
 		public void SetTeamTemplate(TeamTemplate template) {
@@ -107,10 +107,10 @@ namespace LongoMatch.Gui.Dialog
 			teamtemplatewidget1.TeamTemplate=template;
 		}
 
-		private void UpdateSections() {
-			SectionsReader sr = new SectionsReader(templateName);
-			selectedSectionsTemplate = sr.GetSections();
-			SetSectionsTemplate(sr.GetSections());
+		private void UpdateCategories() {
+			CategoriesReader sr = new CategoriesReader(templateName);
+			selectedCategoriesTemplate = sr.GetCategories();
+			SetCategoriesTemplate(sr.GetCategories());
 			SetSensitive(true);
 		}
 
@@ -120,7 +120,7 @@ namespace LongoMatch.Gui.Dialog
 		}
 
 		private void SetSensitive(bool sensitive) {
-			if (useType == UseType.SectionsTemplate)
+			if (useType == UseType.CategoriesTemplate)
 				sectionspropertieswidget1.Sensitive = true;
 			else
 				teamtemplatewidget1.Sensitive = true;
@@ -147,9 +147,9 @@ namespace LongoMatch.Gui.Dialog
 		}
 
 		private void SaveTemplate() {
-			if (useType == UseType.SectionsTemplate) {
-				selectedSectionsTemplate = sectionspropertieswidget1.Sections;
-				SectionsWriter.UpdateTemplate(templateName,selectedSectionsTemplate);
+			if (useType == UseType.CategoriesTemplate) {
+				selectedCategoriesTemplate = sectionspropertieswidget1.Categories;
+				CategoriesWriter.UpdateTemplate(templateName,selectedCategoriesTemplate);
 			}
 			else {
 				selectedTeamTemplate = teamtemplatewidget1.TeamTemplate;
@@ -215,8 +215,8 @@ namespace LongoMatch.Gui.Dialog
 				if (ed.SelectedTemplate != null)
 						System.IO.File.Copy(System.IO.Path.Combine(MainClass.TemplatesDir(),ed.SelectedTemplate),
 						                    System.IO.Path.Combine(MainClass.TemplatesDir(),name+fileExtension));
-				else if (useType == UseType.SectionsTemplate){
-					SectionsWriter.CreateNewTemplate(name+fileExtension);
+				else if (useType == UseType.CategoriesTemplate){
+					CategoriesWriter.CreateNewTemplate(name+fileExtension);
 				}
 				else {
 					TeamTemplate tt = new TeamTemplate();
@@ -266,8 +266,8 @@ namespace LongoMatch.Gui.Dialog
 			treeview.Selection.GetSelected(out iter);
 			templateName = (string) this.dataFileListStore.GetValue(iter, 0);
 
-			if (useType == UseType.SectionsTemplate)
-				UpdateSections();
+			if (useType == UseType.CategoriesTemplate)
+				UpdateCategories();
 
 			else
 				UpdateTeamTemplate();
@@ -282,8 +282,8 @@ namespace LongoMatch.Gui.Dialog
 
 		protected virtual void OnTreeviewRowActivated(object o, Gtk.RowActivatedArgs args)
 		{
-			if (useType == UseType.SectionsTemplate)
-				UpdateSections();
+			if (useType == UseType.CategoriesTemplate)
+				UpdateCategories();
 			else
 				UpdateTeamTemplate();
 		}
diff --git a/LongoMatch/Gui/MainWindow.cs b/LongoMatch/Gui/MainWindow.cs
index 5fb850f..57acf32 100644
--- a/LongoMatch/Gui/MainWindow.cs
+++ b/LongoMatch/Gui/MainWindow.cs
@@ -124,28 +124,29 @@ namespace LongoMatch.Gui
 			
 			/* Update tabs labels */
 			/* FIXME 1.0: Teams should have default names */
-			if (project.VisitorName == "")
+			var desc = project.Description;
+			if (desc.VisitorName == "")
 				visitorteamlabel.Text = Catalog.GetString("Visitor Team");
 			else
-				visitorteamlabel.Text = project.VisitorName;
-			if (project.LocalName == "")
+				visitorteamlabel.Text = desc.VisitorName;
+			if (desc.LocalName == "")
 				localteamlabel.Text = Catalog.GetString("Local Team");
 			else
-				localteamlabel.Text = project.LocalName;
+				localteamlabel.Text = desc.LocalName;
 				
 			if (projectType == ProjectType.FileProject) {
 				// Check if the file associated to the project exists
-				if (!File.Exists (project.File.FilePath)) {
+				if (!File.Exists (desc.File.FilePath)) {
 					MessagePopup.PopupMessage (this, MessageType.Warning,
 					                           Catalog.GetString ("The file associated to this project doesn't exist.") + "\n"
 					                           + Catalog.GetString ("If the location of the file has changed try to edit it with the database manager."));
 					CloseOpenedProject (true);
 					return;
 				}
-				Title = System.IO.Path.GetFileNameWithoutExtension (project.File.FilePath) + 
+				Title = System.IO.Path.GetFileNameWithoutExtension (desc.File.FilePath) + 
 					" - " +	Constants.SOFTWARE_NAME;
 				try {
-					playerbin1.Open (project.File.FilePath);
+					playerbin1.Open (desc.File.FilePath);
 				}
 				catch (GLib.GException ex) {
 					MessagePopup.PopupMessage (this, MessageType.Error,
@@ -185,8 +186,8 @@ namespace LongoMatch.Gui
 			localplayerslisttreewidget.SetTeam(project.LocalTeamTemplate,project.GetLocalTeamModel());
 			visitorplayerslisttreewidget.SetTeam(project.VisitorTeamTemplate,project.GetVisitorTeamModel());
 			tagstreewidget1.Project = project;				
-			buttonswidget1.Sections = project.Sections;
-			hkManager.Sections=project.Sections;
+			buttonswidget1.Categories = project.Categories;
+			hkManager.Categories=project.Categories;
 			KeyPressEvent += hotkeysListener;
 			MakeActionsSensitive(true,projectType);
 			ShowWidgets();
@@ -195,7 +196,7 @@ namespace LongoMatch.Gui
 		private void SaveCaptureProject(){
 			PreviewMediaFile file;
 			Project newProject = openedProject;
-			string filePath = openedProject.File.FilePath;
+			string filePath = openedProject.Description.File.FilePath;
 			
 			MessageDialog md = new MessageDialog((Gtk.Window)this.Toplevel, DialogFlags.Modal, MessageType.Info, ButtonsType.None,
 			                                     Catalog.GetString("Loading newly created project..."));
@@ -204,7 +205,7 @@ namespace LongoMatch.Gui
 			/* scan the new file to build a new PreviewMediaFile with all the metadata */
 			try{
 				file = PreviewMediaFile.GetMediaFile(filePath);		
-				openedProject.File = file;
+				openedProject.Description.File = file;
 				MainClass.DB.AddProject(openedProject);
 			} catch (Exception ex){
 				string projectFile = filePath + "-" + DateTime.Now;
@@ -265,7 +266,7 @@ namespace LongoMatch.Gui
 			noteswidget1.Visible = false;			
 			selectedTimeNode = null;
 			MakeActionsSensitive(false, projectType);
-			hkManager.Sections = null;
+			hkManager.Categories = null;
 			KeyPressEvent -= hotkeysListener;
 		}
 
@@ -296,7 +297,7 @@ namespace LongoMatch.Gui
 		}
 
 		private void ClearWidgets() {
-			buttonswidget1.Sections = null;
+			buttonswidget1.Categories = null;
 			treewidget1.Project = null;
 			tagstreewidget1.Clear();
 			timelinewidget1.Project = null;
@@ -392,7 +393,7 @@ namespace LongoMatch.Gui
 				project = opd.SelectedProject;
 			opd.Destroy();
 			if (project != null)
-				SetProject(MainClass.DB.GetProject(project.File), ProjectType.FileProject, new CapturePropertiesStruct());
+				SetProject(MainClass.DB.GetProject(project.File.FilePath), ProjectType.FileProject, new CapturePropertiesStruct());
 		}
 		
 		protected virtual void OnSaveProjectActionActivated(object sender, System.EventArgs e)
@@ -425,7 +426,7 @@ namespace LongoMatch.Gui
 		
 		protected virtual void OnSectionsTemplatesManagerActivated(object sender, System.EventArgs e)
 		{
-			TemplatesManager tManager = new TemplatesManager(TemplatesManager.UseType.SectionsTemplate);
+			TemplatesManager tManager = new TemplatesManager(TemplatesManager.UseType.CategoriesTemplate);
 			tManager.TransientFor = this;
 			tManager.Show();
 		}
@@ -582,7 +583,7 @@ namespace LongoMatch.Gui
 			return ret;
 		}
 
-		protected virtual void OnTimeNodeSelected(LongoMatch.TimeNodes.MediaTimeNode tNode)
+		protected virtual void OnTimeNodeSelected(Play play)
 		{
 			rightvbox.Visible=true;
 		}
diff --git a/LongoMatch/Gui/TreeView/PlayListTreeView.cs b/LongoMatch/Gui/TreeView/PlayListTreeView.cs
index 824d248..a49728c 100644
--- a/LongoMatch/Gui/TreeView/PlayListTreeView.cs
+++ b/LongoMatch/Gui/TreeView/PlayListTreeView.cs
@@ -38,8 +38,8 @@ namespace LongoMatch.Gui.Component
 		private MenuItem setRate;
 		private ListStore ls;
 		private PlayList playlist;
-		private PlayListTimeNode loadedTimeNode = null; //The play currently loaded in the player
-		private PlayListTimeNode selectedTimeNode = null; //The play selected in the tree
+		private PlayListPlay loadedTimeNode = null; //The play currently loaded in the player
+		private PlayListPlay selectedTimeNode = null; //The play selected in the tree
 		private TreeIter selectedIter;
 
 		public event ApplyCurrentRateHandler ApplyCurrentRate;
@@ -49,7 +49,7 @@ namespace LongoMatch.Gui.Component
 
 			this.HeadersVisible = false;
 
-			ls = new ListStore(typeof(PlayListTimeNode));
+			ls = new ListStore(typeof(PlayListPlay));
 			this.Model = ls;
 
 			menu = new Menu();
@@ -81,7 +81,7 @@ namespace LongoMatch.Gui.Component
 			}
 		}
 
-		public PlayListTimeNode LoadedPlay {
+		public PlayListPlay LoadedPlay {
 			set {
 				loadedTimeNode = value;
 				this.QueueDraw();
diff --git a/LongoMatch/Handlers/EventsManager.cs b/LongoMatch/Handlers/EventsManager.cs
index 55b5814..ec6b794 100644
--- a/LongoMatch/Handlers/EventsManager.cs
+++ b/LongoMatch/Handlers/EventsManager.cs
@@ -156,15 +156,15 @@ namespace LongoMatch
 			player.DrawFrame += OnDrawFrame;
 		}
 
-		private void ProcessNewMarkEvent(int section,Time pos) {
+		private void ProcessNewMarkEvent(Category category,Time pos) {
 			Time length, startTime, stopTime, start, stop, fStart, fStop;	
 			
 			if (player == null || openedProject == null)
 				return;
 						
 			//Get the default lead and lag time for the section
-			startTime = openedProject.Sections.GetStartTime(section);
-			stopTime = openedProject.Sections.GetStopTime(section);
+			startTime = category.Start;
+			stopTime = category.Stop;
 			// Calculating borders of the segment depnding
 			start = pos - startTime;
 			stop = pos + stopTime;
@@ -178,12 +178,11 @@ namespace LongoMatch
 				length = new Time((int)player.StreamLength);
 				fStop = (stop > length) ? length: stop;
 			}	
-			AddNewPlay(fStart, fStop, section);
+			AddNewPlay(fStart, fStop, category);
 		}
 		
-		private void AddNewPlay(Time start, Time stop, int section){
+		private void AddNewPlay(Time start, Time stop, Category category){
 			Pixbuf miniature;
-			MediaTimeNode tn;
 		
 			if (projectType == ProjectType.CaptureProject){
 				if (!capturer.Capturing){
@@ -198,9 +197,9 @@ namespace LongoMatch
 				miniature = player.CurrentMiniatureFrame;
 			else 
 				miniature = null;
-			tn = openedProject.AddTimeNode(section, start, stop,miniature);
-			treewidget.AddPlay(tn,section);
-			tagsTreeWidget.AddPlay(tn);
+			var play = openedProject.AddPlay(category, start, stop,miniature);
+			treewidget.AddPlay(play);
+			tagsTreeWidget.AddPlay(play);
 			timeline.QueueDraw();
 		}
 
@@ -233,14 +232,13 @@ namespace LongoMatch
 			}
 		}
 
-		protected virtual void OnNewMarkAtFrame(int section, int frame) {
-
-			Time pos = new Time(frame*1000/openedProject.File.Fps);
+		protected virtual void OnNewMarkAtFrame(Category category, int frame) {
+			Time pos = new Time(frame*1000/openedProject.Description.File.Fps);
 			player.SeekTo ((long)pos.MSeconds, true);
-			ProcessNewMarkEvent(section,pos);
+			ProcessNewMarkEvent(category,pos);
 		}
 
-		public virtual void OnNewMark(int i) {
+		public virtual void OnNewMark(Category category) {
 			Time pos;
 			
 			if (projectType == ProjectType.FakeCaptureProject || 
@@ -248,14 +246,14 @@ namespace LongoMatch
 				pos =  new Time((int)capturer.CurrentTime);
 			else 
 				pos = new Time((int)player.CurrentTime);
-			ProcessNewMarkEvent(i,pos);
+			ProcessNewMarkEvent(category,pos);
 		}
 		
 		public virtual void OnNewMarkStart(){
 			startTime = new Time((int)player.CurrentTime);
 		}
 		
-		public virtual void OnNewMarkStop(int section){
+		public virtual void OnNewMarkStop(Category category){
 			int diff;
 			Time stopTime = new Time((int)player.CurrentTime);
 			
@@ -274,10 +272,10 @@ namespace LongoMatch
 				else 
 					stopTime = stopTime + correction;			
 			} 
-			AddNewPlay(startTime, stopTime, section);		
+			AddNewPlay(startTime, stopTime, category);		
 		}
 
-		protected virtual void OnTimeNodeSelected(MediaTimeNode tNode)
+		protected virtual void OnTimeNodeSelected(Play tNode)
 		{
 			selectedTimeNode = tNode;
 			timeline.SelectedTimeNode = tNode;
@@ -292,9 +290,9 @@ namespace LongoMatch
 			//Si hemos modificado el valor de un nodo de tiempo a través del
 			//widget de ajuste de tiempo posicionamos el reproductor en el punto
 			//
-			if (tNode is MediaTimeNode && val is Time) {
+			if (tNode is Play && val is Time) {
 				if (tNode != selectedTimeNode)
-					OnTimeNodeSelected((MediaTimeNode)tNode);
+					OnTimeNodeSelected((Play)tNode);
 				Time pos = (Time)val;
 				if (pos == tNode.Start) {
 					player.UpdateSegmentStartTime(pos.MSeconds);
@@ -303,19 +301,23 @@ namespace LongoMatch
 					player.UpdateSegmentStopTime(pos.MSeconds);
 				}
 			}
-			else if (tNode is SectionsTimeNode) {
-				buttonswidget.Sections = openedProject.Sections;
+			else if (tNode is Categories) {
+				buttonswidget.Categories = openedProject.Categories;
 			}
 		}
 
-		protected virtual void OnTimeNodeDeleted(MediaTimeNode tNode,int section)
+		protected virtual void OnTimeNodeDeleted(Play play, Category category)
 		{
-			treewidget.DeletePlay(tNode,section);
-			foreach (int player in tNode.LocalPlayers)
-				localPlayersList.DeleteTimeNode(tNode,player);
-			foreach (int player in tNode.VisitorPlayers)
-				visitorPlayersList.DeleteTimeNode(tNode,player);
-			openedProject.DeleteTimeNode(tNode,section);
+			/* FIXME: WIP*/
+			treewidget.RemovePlay(play);
+
+			foreach (var player in play.LocalPlayers)
+				localPlayersList.RemovePlay(play ,player);
+
+			foreach (var player in play.VisitorPlayers)
+				visitorPlayersList.RemovePlay(play ,player);
+
+			openedProject.RemovePlay(play);
 			if (projectType == ProjectType.FileProject){
 				this.player.CloseActualSegment();
 				MainClass.DB.UpdateProject(openedProject);
@@ -323,12 +325,19 @@ namespace LongoMatch
 			timeline.QueueDraw();			
 		}
 
-		protected virtual void OnPlayListNodeAdded(MediaTimeNode tNode)
+		protected virtual void OnPlayListNodeAdded(Play play)
 		{
-			playlist.Add(new PlayListTimeNode(openedProject.File,tNode));
+			playlist.Add(new PlayListPlay{
+				MediaFile = openedProject.Description.File,
+				Start = play.Start,
+				Stop = play.Stop,
+				Name = play.Name,
+				Duration = play.Stop - play.Start,
+				Rate = 1.0f,
+			});
 		}
 
-		protected virtual void OnPlayListNodeSelected(PlayListTimeNode plNode, bool hasNext)
+		protected virtual void OnPlayListNodeSelected(PlayListPlay plNode, bool hasNext)
 		{
 			if (openedProject == null) {
 				if (plNode.Valid) {
@@ -355,7 +364,7 @@ namespace LongoMatch
 			notes.Visible = false;
 		}
 
-		protected virtual void OnSnapshotSeries(MediaTimeNode tNode) {
+		protected virtual void OnSnapshotSeries(Play tNode) {
 			SnapshotsDialog sd;
 			uint interval;
 			string seriesName;
@@ -372,7 +381,9 @@ namespace LongoMatch
 				interval = sd.Interval;
 				seriesName = sd.SeriesName;
 				outDir = System.IO.Path.Combine(MainClass.SnapshotsDir(),seriesName);
-				fsc = new FramesSeriesCapturer(openedProject.File.FilePath,tNode.Start.MSeconds,tNode.Stop.MSeconds,interval,outDir);
+				fsc = new FramesSeriesCapturer(openedProject.Description.File.FilePath,
+				                               tNode.Start.MSeconds,tNode.Stop.MSeconds,
+				                               interval,outDir);
 				fcpd = new FramesCaptureProgressDialog(fsc);
 				fcpd.TransientFor=(Gtk.Window) treewidget.Toplevel;
 				fcpd.Run();
@@ -389,9 +400,9 @@ namespace LongoMatch
 
 		protected virtual void OnPrev()
 		{
-			if (selectedTimeNode is MediaTimeNode)
+			if (selectedTimeNode is Play)
 				player.SeekInSegment(selectedTimeNode.Start.MSeconds);
-			else if (selectedTimeNode is PlayListTimeNode)
+			else if (selectedTimeNode is PlayListPlay)
 				playlist.Prev();
 			else if (selectedTimeNode == null)
 				player.SeekTo(0,false);
@@ -400,7 +411,8 @@ namespace LongoMatch
 		protected virtual void OnTick(object o, TickArgs args)
 		{
 			if (args.CurrentTime != 0 && timeline != null && openedProject != null)
-				timeline.CurrentFrame=(uint)(args.CurrentTime * openedProject.File.Fps / 1000);
+				timeline.CurrentFrame=(uint)(args.CurrentTime * 
+				                             openedProject.Description.File.Fps / 1000);
 		}
 
 		protected virtual void OnTimeline2PositionChanged(Time pos)
@@ -408,7 +420,7 @@ namespace LongoMatch
 			player.SeekInSegment(pos.MSeconds);
 		}
 
-		protected virtual void OnApplyRate(PlayListTimeNode plNode) {
+		protected virtual void OnApplyRate(PlayListPlay plNode) {
 			plNode.Rate = player.Rate;
 		}
 
@@ -423,7 +435,7 @@ namespace LongoMatch
 			dialog.Image = pixbuf;
 			dialog.TransientFor = (Gtk.Window)player.Toplevel;
 			if (selectedTimeNode != null)
-				dialog.SetPlay((selectedTimeNode as MediaTimeNode),
+				dialog.SetPlay((selectedTimeNode as Play),
 				               time);
 			player.Pause();
 			pixbuf.Dispose();
@@ -431,7 +443,7 @@ namespace LongoMatch
 			dialog.Destroy();
 		}
 		
-		protected virtual void OnTagPlay(MediaTimeNode tNode){
+		protected virtual void OnTagPlay(Play tNode){
 			TaggerDialog tagger = new TaggerDialog();
 			tagger.ProjectTags = openedProject.Tags;
 			tagger.Tags = tNode.Tags;
@@ -445,7 +457,7 @@ namespace LongoMatch
 			tagger.Destroy();
 		}
 
-		protected virtual void OnPlayersTagged(MediaTimeNode tNode, Team team) {
+		protected virtual void OnPlayersTagged(Play tNode, Team team) {
 			PlayersSelectionDialog dialog = new PlayersSelectionDialog();
 			if (team == Team.LOCAL) {
 				dialog.SetPlayersInfo(openedProject.LocalTeamTemplate);
diff --git a/LongoMatch/Handlers/Handlers.cs b/LongoMatch/Handlers/Handlers.cs
index 0f94697..6f179e4 100644
--- a/LongoMatch/Handlers/Handlers.cs
+++ b/LongoMatch/Handlers/Handlers.cs
@@ -30,33 +30,33 @@ namespace LongoMatch.Handlers
 
 	/*Tagging Events*/
 	//A Play was selected
-	public delegate void TimeNodeSelectedHandler(MediaTimeNode tNode);
+	public delegate void TimeNodeSelectedHandler(Play play);
 	//A new play needs to be create for a specific category at the current play time
-	public delegate void NewMarkEventHandler(int i);
+	public delegate void NewMarkEventHandler(Category category);
 	//The start time of a new play has been signaled
 	public delegate void NewMarkStartHandler();
 	//The stop of a nes play has been signaled
-	public delegate void NewMarkStopHandler(int i);
+	public delegate void NewMarkStopHandler(Category category);
 	//Several plays needs to be created for a several categories
 	public delegate void NewMarksEventHandler(List<int> sections);
 	//A need play needs to be created at precise frame
-	public delegate void NewMarkAtFrameEventHandler(int i,int frame);
+	public delegate void NewMarkAtFrameEventHandler(Category category,int frame);
 	//A play was edited
 	public delegate void TimeNodeChangedHandler(TimeNode tNode, object val);
 	//A play was deleted
-	public delegate void TimeNodeDeletedHandler(MediaTimeNode tNode,int section);
+	public delegate void TimeNodeDeletedHandler(Play play, Category category);
 	//Players needs to be tagged
-	public delegate void PlayersTaggedHandler(MediaTimeNode tNode, Team team);
+	public delegate void PlayersTaggedHandler(Play play, Team team);
 	//Tag a play
-	public delegate void TagPlayHandler(MediaTimeNode tNode);
+	public delegate void TagPlayHandler(Play play);
 
 	/*Playlist Events*/
 	//Add the a play to the opened playlist
-	public delegate void PlayListNodeAddedHandler(MediaTimeNode tNode);
+	public delegate void PlayListNodeAddedHandler(Play play);
 	//A play list element is selected
-	public delegate void PlayListNodeSelectedHandler(PlayListTimeNode plNode, bool hasNext);
+	public delegate void PlayListNodeSelectedHandler(PlayListPlay play, bool hasNext);
 	//Save current playrate to a play list element
-	public delegate void ApplyCurrentRateHandler(PlayListTimeNode plNode);
+	public delegate void ApplyCurrentRateHandler(PlayListPlay play);
 
 	//Drawing events
 	//Draw tool changed
@@ -78,13 +78,13 @@ namespace LongoMatch.Handlers
 	//A date was selected
 	public delegate void DateSelectedHandler(DateTime selectedDate);
 	//Create snapshots for a play
-	public delegate void SnapshotSeriesHandler(MediaTimeNode tNode);
+	public delegate void SnapshotSeriesHandler(Play tNode);
 	//A new version of the software exists
 	public delegate void NewVersionHandler(Version version, string URL);
 
 	
-	public delegate void SectionHandler(SectionsTimeNode tNode);
-	public delegate void SectionsHandler(List<SectionsTimeNode> tNodesList);
+	public delegate void SectionHandler(Category category);
+	public delegate void SectionsHandler(List<Category> categoriesList);
 	
 	public delegate void ProjectsSelectedHandler(List<ProjectDescription> projects);
 }
diff --git a/LongoMatch/Handlers/HotKeysManager.cs b/LongoMatch/Handlers/HotKeysManager.cs
index e584c03..a9912f6 100644
--- a/LongoMatch/Handlers/HotKeysManager.cs
+++ b/LongoMatch/Handlers/HotKeysManager.cs
@@ -31,24 +31,24 @@ namespace LongoMatch.Handlers
 
 	public class HotKeysManager
 	{
-		private Dictionary<HotKey,int> dic;
+		private Dictionary<HotKey, Category> dic;
 		public event NewMarkEventHandler newMarkEvent;
 
 		public HotKeysManager()
 		{
-			dic = new Dictionary<HotKey,int>();
+			dic = new Dictionary<HotKey,Category>();
 		}
 
 		// Set the active Hotkeys for the current project
-		public Sections Sections {
+		public Categories Categories {
 			set {
 				dic.Clear();
 				if (value == null)
 					return;
-				for (int i=0;i<value.Count;i++) {
-					if (value.GetHotKey(i).Defined &&
-					                !dic.ContainsKey(value.GetHotKey(i)))
-						dic.Add(value.GetHotKey(i),i);
+				foreach (Category cat in value) {
+					if (cat.HotKey.Defined &&
+					                !dic.ContainsKey(cat.HotKey))
+						dic.Add(cat.HotKey, cat);
 				}
 			}
 		}
@@ -56,13 +56,14 @@ namespace LongoMatch.Handlers
 		// Listen to key press events and fire a newMarkEvent event if the key combination
 		// is associated to a Category
 		public void KeyListener(object sender, KeyPressEventArgs args) {
-			int section=-1;
+			Category cat = null;
 			HotKey hotkey = new HotKey();
+			
 			hotkey.Key=args.Event.Key;
 			hotkey.Modifier=args.Event.State & (ModifierType.Mod1Mask | ModifierType.Mod5Mask | ModifierType.ShiftMask);
-			if (dic.TryGetValue(hotkey,out section)) {
+			if (dic.TryGetValue(hotkey, cat)) {
 				if (newMarkEvent != null) {
-					newMarkEvent(section);
+					newMarkEvent(cat);
 				}
 			}
 		}
diff --git a/LongoMatch/Handlers/VideoDrawingsManager.cs b/LongoMatch/Handlers/VideoDrawingsManager.cs
index c354899..20b9873 100644
--- a/LongoMatch/Handlers/VideoDrawingsManager.cs
+++ b/LongoMatch/Handlers/VideoDrawingsManager.cs
@@ -36,7 +36,7 @@ namespace LongoMatch.Handlers
 		private uint timeout;
 		private bool inKeyFrame;
 		private bool canStop;
-		private MediaTimeNode loadedPlay;
+		private Play loadedPlay;
 
 		public VideoDrawingsManager(PlayerBin player)
 		{
@@ -48,7 +48,7 @@ namespace LongoMatch.Handlers
 			StopClock();
 		}
 
-		public MediaTimeNode Play {
+		public Play Play {
 			set {
 				loadedPlay = value;
 				inKeyFrame = false;
diff --git a/LongoMatch/IO/CSVExport.cs b/LongoMatch/IO/CSVExport.cs
index a07123d..6b2e2c2 100644
--- a/LongoMatch/IO/CSVExport.cs
+++ b/LongoMatch/IO/CSVExport.cs
@@ -46,8 +46,8 @@ namespace LongoMatch.IO
 
 		#region Public methods
 		public void WriteToFile() {
-			List<List<MediaTimeNode>> list;
-			Dictionary<Tag, List<MediaTimeNode>> tagsDic;
+			/*List<List<Play>> list;
+			Dictionary<Tag, List<Play>> tagsDic;
 			List<Player> localPlayersList;
 			List<Player> visitorPlayersList;
 			Dictionary<Player, List<object[]>> localPlayersDic;
@@ -60,9 +60,9 @@ namespace LongoMatch.IO
 			list = project.GetDataArray();
 			sectionNames = project.GetSectionsNames();
 			
-			tagsDic = new Dictionary<Tag, List<MediaTimeNode>>();
+			tagsDic = new Dictionary<Tag, List<Play>>();
 			foreach (Tag tag in project.Tags)
-				tagsDic.Add(tag, new List<MediaTimeNode>());
+				tagsDic.Add(tag, new List<Play>());
 			
 			localPlayersList = project.LocalTeamTemplate.GetPlayersList();
 			localPlayersDic = new Dictionary<Player, List<object[]>>();
@@ -85,7 +85,7 @@ namespace LongoMatch.IO
 			             Catalog.GetString("Duration")));
 			for (int i=0; i<list.Count; i++) {
 				string sectionName = sectionNames[i];
-				foreach (MediaTimeNode tn in list[i]) {
+				foreach (Play tn in list[i]) {
 					// Parse Play's tags
 					foreach (Tag t in tn.Tags)
 						tagsDic[t].Add(tn);
@@ -123,13 +123,13 @@ namespace LongoMatch.IO
 			
 			tx.Close();
 			
-			MessagePopup.PopupMessage(null, MessageType.Info, Catalog.GetString("CSV exported successfully."));			
+			MessagePopup.PopupMessage(null, MessageType.Info, Catalog.GetString("CSV exported successfully."));	*/		
 		}
 		#endregion
 		
 		#region Private Methods
 		
-		private void WriteCatagoriesData(TextWriter tx, Dictionary<Tag, List<MediaTimeNode>> tagsDic){
+		private void WriteCatagoriesData(TextWriter tx, Dictionary<Tag, List<Play>> tagsDic){
 			// Write Tags table
 			tx.WriteLine(String.Format("{0};{1};{2};{3};{4};{5}",
 			             Catalog.GetString("Tag"),
@@ -138,11 +138,11 @@ namespace LongoMatch.IO
 			             Catalog.GetString("StartTime"),
 			             Catalog.GetString("StopTime"),
 			             Catalog.GetString("Duration")));
-			foreach (KeyValuePair<Tag,List<MediaTimeNode>> pair in tagsDic){
+			foreach (KeyValuePair<Tag,List<Play>> pair in tagsDic){
 				if (pair.Value.Count == 0)
 					continue;				
-				foreach (MediaTimeNode tn in pair.Value) {
-					tx.WriteLine("\""+pair.Key.Text+"\";\""+
+				foreach (Play tn in pair.Value) {
+					tx.WriteLine("\""+pair.Key.Value+"\";\""+
 					             tn.Name+"\";\""+
 					             tn.Team+"\";\""+
 					             tn.Start.ToMSecondsString()+"\";\""+
@@ -169,7 +169,7 @@ namespace LongoMatch.IO
 					continue;			
 				foreach (object[] o in pair.Value) {
 					string sectionName = (string)o[0];
-					MediaTimeNode tn = (MediaTimeNode)o[1];
+					Play tn = (Play)o[1];
 					tx.WriteLine("\""+pair.Key.Name+"\";\""+
 					             sectionName+"\";\""+
 					             tn.Name+"\";\""+
diff --git a/LongoMatch/IO/SectionsReader.cs b/LongoMatch/IO/SectionsReader.cs
index bb647e1..9ab11ed 100644
--- a/LongoMatch/IO/SectionsReader.cs
+++ b/LongoMatch/IO/SectionsReader.cs
@@ -30,12 +30,12 @@ namespace LongoMatch.IO
 {
 
 
-	public class SectionsReader : XMLReader
+	public class CategoriesReader : XMLReader
 	{
 
 		#region Constructors
 
-		public SectionsReader(string filePath) : base(filePath)
+		public CategoriesReader(string filePath) : base(filePath)
 		{
 		}
 		#endregion
@@ -79,15 +79,20 @@ namespace LongoMatch.IO
 		#endregion
 
 		#region Public methods
-		public Sections GetSections() {
+		public Categories GetSections() {
 			Sections sections = new Sections();
 			bool tryNext = true;
 			string name;
-			SectionsTimeNode tn;
+			Category tn;
 			for (int i=1;tryNext;i++) {
 				name = GetName(i);
 				if (name != null) {
-					tn = new SectionsTimeNode(name, GetStartTime(i), GetStopTime(i), GetHotKey(i), GetColor(i));
+					tn = new Category{
+					                  Name = name,
+					                  Start = GetStartTime(i),
+					                  Stop = GetStopTime(i),
+					                  HotKey = GetHotKey(i), 
+					                  Color  = ColorGetColor(i)};
 					tn.SortMethodString = GetSortMethod(i);
 					sections.AddSection(tn);
 				}
diff --git a/LongoMatch/IO/SectionsWriter.cs b/LongoMatch/IO/SectionsWriter.cs
index bc546f3..df2dc9f 100644
--- a/LongoMatch/IO/SectionsWriter.cs
+++ b/LongoMatch/IO/SectionsWriter.cs
@@ -73,7 +73,7 @@ namespace LongoMatch.IO
 
 
 
-		public static void UpdateTemplate(string templateName,Sections sections) {
+		public static void UpdateTemplate(string templateName,Categories categories) {
 
 			string fConfig = Path.Combine(MainClass.TemplatesDir(), templateName);
 			XmlDocument configXml = new XmlDocument();
@@ -83,26 +83,21 @@ namespace LongoMatch.IO
 			sb.Append("<?xml version=\"1.0\" encoding=\"utf-8\" ?>");
 			sb.Append("<configuration>");
 
-			foreach (SectionsTimeNode tn in sections.SectionsTimeNodes) {
-				sb.Append(String.Format("<add key=\"Name{0}\" value=\"{1}\" />",i,tn.Name));
-				sb.Append(String.Format("<add key=\"Start{0}\" value=\"{1}\" />",i,tn.Start.Seconds));
-				sb.Append(String.Format("<add key=\"Stop{0}\" value=\"{1}\" />",i,tn.Stop.Seconds));
-				sb.Append(String.Format("<add key=\"Red{0}\" value=\"{1}\" />",i,tn.Color.Red));
-				sb.Append(String.Format("<add key=\"Green{0}\" value=\"{1}\" />",i,tn.Color.Green));
-				sb.Append(String.Format("<add key=\"Blue{0}\" value=\"{1}\" />",i,tn.Color.Blue));
-				sb.Append(String.Format("<add key=\"Modifier{0}\" value=\"{1}\" />",i,(int)(tn.HotKey.Modifier)));
-				sb.Append(String.Format("<add key=\"Key{0}\" value=\"{1}\" />",i,(int)(tn.HotKey.Key)));
-				sb.Append(String.Format("<add key=\"SortMethod{0}\" value=\"{1}\" />",i,tn.SortMethodString));
+			foreach (var cat in categories.CategoriesList) {
+				sb.Append(String.Format("<add key=\"Name{0}\" value=\"{1}\" />",i,cat.Name));
+				sb.Append(String.Format("<add key=\"Start{0}\" value=\"{1}\" />",i,cat.Start.Seconds));
+				sb.Append(String.Format("<add key=\"Stop{0}\" value=\"{1}\" />",i,cat.Stop.Seconds));
+				sb.Append(String.Format("<add key=\"Red{0}\" value=\"{1}\" />",i,cat.Color.Red));
+				sb.Append(String.Format("<add key=\"Green{0}\" value=\"{1}\" />",i,cat.Color.Green));
+				sb.Append(String.Format("<add key=\"Blue{0}\" value=\"{1}\" />",i,cat.Color.Blue));
+				sb.Append(String.Format("<add key=\"Modifier{0}\" value=\"{1}\" />",i,(int)(cat.HotKey.Modifier)));
+				sb.Append(String.Format("<add key=\"Key{0}\" value=\"{1}\" />",i,(int)(cat.HotKey.Key)));
+				sb.Append(String.Format("<add key=\"SortMethod{0}\" value=\"{1}\" />",i,cat.SortMethodString));
 				i++;
 			}
 			sb.Append("</configuration>");
 			configXml.LoadXml(sb.ToString());
 			configXml.Save(fConfig);
 		}
-
-
-
-
-
 	}
 }
diff --git a/LongoMatch/LongoMatch.mdp b/LongoMatch/LongoMatch.mdp
index 4d7af62..bd8346e 100644
--- a/LongoMatch/LongoMatch.mdp
+++ b/LongoMatch/LongoMatch.mdp
@@ -26,16 +26,13 @@
     <File subtype="Directory" buildaction="Compile" name="Handlers" />
     <File subtype="Code" buildaction="Compile" name="Handlers/Handlers.cs" />
     <File subtype="Directory" buildaction="Compile" name="IO" />
-    <File subtype="Code" buildaction="Compile" name="IO/SectionsWriter.cs" />
-    <File subtype="Code" buildaction="Compile" name="IO/SectionsReader.cs" />
-    <File subtype="Code" buildaction="Compile" name="IO/XMLReader.cs" />
     <File subtype="Directory" buildaction="Compile" name="Time" />
-    <File subtype="Code" buildaction="Compile" name="Time/MediaTimeNode.cs" />
+    <File subtype="Code" buildaction="Compile" name="Time/Play.cs" />
     <File subtype="Code" buildaction="Compile" name="Time/PixbufTimeNode.cs" />
-    <File subtype="Code" buildaction="Compile" name="Time/SectionsTimeNode.cs" />
+    <File subtype="Code" buildaction="Compile" name="Time/Category.cs" />
     <File subtype="Code" buildaction="Compile" name="Time/TimeNode.cs" />
     <File subtype="Code" buildaction="Compile" name="Time/Time.cs" />
-    <File subtype="Code" buildaction="Compile" name="Time/PlayListTimeNode.cs" />
+    <File subtype="Code" buildaction="Compile" name="Time/PlayListPlay.cs" />
     <File subtype="Code" buildaction="EmbedAsResource" name="images/longomatch.png" DeployService.RelativeDeployPath="images/longomatch.png" DeployService.TargetDirectoryId="CommonApplicationDataRoot" />
     <File subtype="Directory" buildaction="Compile" name="images" />
     <File subtype="Code" name="images/background.png" DeployService.Deploy="True" DeployService.RelativeDeployPath="images/background.png" DeployService.TargetDirectoryId="CommonApplicationDataRoot" buildaction="FileCopy" />
@@ -53,22 +50,6 @@
     <File subtype="Code" buildaction="Compile" name="Time/Player.cs" />
     <File subtype="Code" buildaction="Nothing" name="images/logo_48x48.png" DeployService.RelativeDeployPath="icons/hicolor/48x48/longomatch.png" DeployService.TargetDirectoryId="CommonApplicationDataRoot" />
     <File subtype="Code" buildaction="Compile" name="DB/TagsTemplate.cs" />
-    <File subtype="Code" buildaction="Compile" name="Compat/0.0/DatabaseMigrator.cs" />
-    <File subtype="Code" buildaction="Compile" name="Compat/0.0/PlayListMigrator.cs" />
-    <File subtype="Code" buildaction="Compile" name="Compat/0.0/DB/DataBase.cs" />
-    <File subtype="Code" buildaction="Compile" name="Compat/0.0/DB/MediaFile.cs" />
-    <File subtype="Code" buildaction="Compile" name="Compat/0.0/DB/Project.cs" />
-    <File subtype="Code" buildaction="Compile" name="Compat/0.0/DB/Sections.cs" />
-    <File subtype="Code" buildaction="Compile" name="Compat/0.0/Playlist/IPlayList.cs" />
-    <File subtype="Code" buildaction="Compile" name="Compat/0.0/Playlist/PlayList.cs" />
-    <File subtype="Code" buildaction="Compile" name="Compat/0.0/Time/MediaTimeNode.cs" />
-    <File subtype="Code" buildaction="Compile" name="Compat/0.0/Time/PixbufTimeNode.cs" />
-    <File subtype="Code" buildaction="Compile" name="Compat/0.0/Time/PlayListTimeNode.cs" />
-    <File subtype="Code" buildaction="Compile" name="Compat/0.0/Time/SectionsTimeNode.cs" />
-    <File subtype="Code" buildaction="Compile" name="Compat/0.0/Time/Time.cs" />
-    <File subtype="Code" buildaction="Compile" name="Compat/0.0/Time/TimeNode.cs" />
-    <File subtype="Code" buildaction="Compile" name="Compat/0.0/TemplatesMigrator.cs" />
-    <File subtype="Code" buildaction="Compile" name="Compat/0.0/IO/SectionsReader.cs" />
     <File subtype="Code" buildaction="Compile" name="Gui/TransparentDrawingArea.cs" />
     <File subtype="Code" buildaction="Compile" name="Handlers/DrawingManager.cs" />
     <File subtype="Directory" buildaction="Compile" name="Gui/Dialog" />
@@ -105,7 +86,6 @@
     <File subtype="Code" buildaction="Compile" name="Gui/Dialog/TemplatesEditor.cs" />
     <File subtype="Code" buildaction="Compile" name="Gui/Component/ProjectTemplateWidget.cs" />
     <File subtype="Code" buildaction="Compile" name="Gui/TreeView/CategoriesTreeView.cs" />
-    <File subtype="Code" buildaction="Compile" name="Gui/Dialog/Migrator.cs" />
     <File subtype="Code" buildaction="Compile" name="Gui/Component/TimeLineWidget.cs" />
     <File subtype="Code" buildaction="Compile" name="Gui/Component/TimeScale.cs" />
     <File subtype="Code" buildaction="Compile" name="Gui/Dialog/VideoEditionProperties.cs" />
@@ -169,7 +149,6 @@
     <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.TemplatesManager.cs" />
     <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Component.PlayersListTreeWidget.cs" />
     <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.PlayersSelectionDialog.cs" />
-    <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.Migrator.cs" />
     <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.Win32CalendarDialog.cs" />
     <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Popup.TransparentDrawingArea.cs" />
     <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Component.DrawingToolBox.cs" />
@@ -185,6 +164,10 @@
     <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.EndCaptureDialog.cs" />
     <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.BusyDialog.cs" />
     <File subtype="Code" buildaction="Compile" name="Gui/TreeView/ListTreeViewBase.cs" />
+    <File subtype="Directory" buildaction="Compile" name="Compat" />
+    <File subtype="Code" buildaction="Compile" name="IO/XMLReader.cs" />
+    <File subtype="Code" buildaction="Compile" name="IO/SectionsReader.cs" />
+    <File subtype="Code" buildaction="Compile" name="IO/SectionsWriter.cs" />
   </Contents>
   <References>
     <ProjectReference type="Gac" localcopy="True" refto="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
@@ -198,6 +181,7 @@
     <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
     <ProjectReference type="Gac" localcopy="True" refto="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
     <ProjectReference type="Assembly" localcopy="True" specificVersion="False" refto="../../../../../usr/lib/mono/gac/Db4objects.Db4o/7.4.121.14026__6199cd4f203aa8eb/Db4objects.Db4o.dll" />
+    <ProjectReference type="Gac" localcopy="True" refto="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
   </References>
   <LanguageParameters StartupObject="LongoMatch.MainClass" ApplicationIcon="." CodePage="65001" ctype="CSharpProjectParameters" />
   <Deployment.LinuxDeployData />
diff --git a/LongoMatch/Main.cs b/LongoMatch/Main.cs
index 78ddef6..20aa18d 100644
--- a/LongoMatch/Main.cs
+++ b/LongoMatch/Main.cs
@@ -146,8 +146,7 @@ namespace LongoMatch
 
 			fConfig = System.IO.Path.Combine(TemplatesDir(),"default.tem");
 			if (!System.IO.File.Exists(fConfig)) {
-				TeamTemplate tt = new TeamTemplate();
-				tt.CreateDefaultTemplate(20);
+				TeamTemplate tt = TeamTemplate.DefautlTemplate(20);
 				tt.Save(fConfig);
 			}
 		}
@@ -166,9 +165,9 @@ namespace LongoMatch
 				md.Icon=Stetic.IconLoader.LoadIcon(md, "longomatch", Gtk.IconSize.Dialog);
 				if (md.Run()==(int)ResponseType.Yes) {
 					md.Destroy();
-					Migrator migrator = new Migrator(homeDirectory);
-					migrator.Run();
-					migrator.Destroy();
+					//Migrator migrator = new Migrator(homeDirectory);
+					//migrator.Run();
+					//migrator.Destroy();
 				}
 				else
 					md.Destroy();
diff --git a/LongoMatch/Playlist/IPlayList.cs b/LongoMatch/Playlist/IPlayList.cs
index 8996983..095c695 100644
--- a/LongoMatch/Playlist/IPlayList.cs
+++ b/LongoMatch/Playlist/IPlayList.cs
@@ -31,16 +31,27 @@ namespace LongoMatch.Playlist {
 			get;
 		}
 		void Load(string path);
+		
 		void Save(string path);
-		void Add(PlayListTimeNode plNode);
-		void Remove(PlayListTimeNode plNode);
-		PlayListTimeNode Next();
-		PlayListTimeNode Prev();
-		PlayListTimeNode Select(int index);
+		
+		void Add(PlayListPlay play);
+		
+		void Remove(PlayListPlay play);
+		
+		PlayListPlay Next();
+		
+		PlayListPlay Prev();
+		
+		PlayListPlay Select(int index);
+		
 		int GetCurrentIndex();
+		
 		bool HasNext();
+		
 		bool HasPrev();
+		
 		ListStore GetModel();
+		
 		IPlayList Copy();
 	}
 }
diff --git a/LongoMatch/Playlist/PlayList.cs b/LongoMatch/Playlist/PlayList.cs
index 517dc2f..b3415bd 100644
--- a/LongoMatch/Playlist/PlayList.cs
+++ b/LongoMatch/Playlist/PlayList.cs
@@ -34,7 +34,7 @@ namespace LongoMatch.Playlist
 	public class PlayList: IPlayList
 	{
 
-		private  List<PlayListTimeNode> list;
+		private  List<PlayListPlay> list;
 		private static XmlSerializer ser;
 		private string filename = null;
 		private int indexSelection = 0;
@@ -42,18 +42,18 @@ namespace LongoMatch.Playlist
 
 		#region Constructors
 		public PlayList() {
-			ser = new XmlSerializer(typeof(List<PlayListTimeNode>),new Type[] {typeof(PlayListTimeNode)});
-			list = new List<PlayListTimeNode>();
+			ser = new XmlSerializer(typeof(List<PlayListPlay>),new Type[] {typeof(PlayListPlay)});
+			list = new List<PlayListPlay>();
 			version = new Version(1,0);
 		}
 
 		public PlayList(string file)
 		{
-			ser = new XmlSerializer(typeof(List<PlayListTimeNode>),new Type[] {typeof(PlayListTimeNode)});
+			ser = new XmlSerializer(typeof(List<PlayListPlay>),new Type[] {typeof(PlayListPlay)});
 
 			//For new Play List
 			if (!System.IO.File.Exists(file)) {
-				list = new List<PlayListTimeNode>();
+				list = new List<PlayListPlay>();
 				filename = file;
 			}
 			else
@@ -90,13 +90,13 @@ namespace LongoMatch.Playlist
 			using(FileStream strm = new FileStream(file, FileMode.Open, FileAccess.Read))
 			{
 				try {
-					list = ser.Deserialize(strm) as List<PlayListTimeNode>;
+					list = ser.Deserialize(strm) as List<PlayListPlay>;
 				}
 				catch {
 					throw new Exception(Catalog.GetString("The file you are trying to load is not a valid playlist"));
 				}
 			}
-			foreach (PlayListTimeNode plNode in list) {
+			foreach (PlayListPlay plNode in list) {
 				plNode.Valid = System.IO.File.Exists(plNode.MediaFile.FilePath);
 			}
 			filename = file;
@@ -122,30 +122,30 @@ namespace LongoMatch.Playlist
 			return indexSelection;
 		}
 
-		public PlayListTimeNode Next() {
+		public PlayListPlay Next() {
 			if (HasNext())
 				indexSelection++;
 			return list[indexSelection];
 		}
 
-		public PlayListTimeNode Prev() {
+		public PlayListPlay Prev() {
 			if (HasPrev())
 				indexSelection--;
 			return list[indexSelection];
 		}
 
-		public void Add(PlayListTimeNode plNode) {
+		public void Add(PlayListPlay plNode) {
 			list.Add(plNode);
 		}
 
-		public void Remove(PlayListTimeNode plNode) {
+		public void Remove(PlayListPlay plNode) {
 
 			list.Remove(plNode);
 			if (GetCurrentIndex() >= list.Count)
 				indexSelection --;
 		}
 
-		public PlayListTimeNode Select(int index) {
+		public PlayListPlay Select(int index) {
 			indexSelection = index;
 			return list[index];
 		}
@@ -159,8 +159,8 @@ namespace LongoMatch.Playlist
 		}
 
 		public ListStore GetModel() {
-			Gtk.ListStore listStore = new ListStore(typeof(PlayListTimeNode));
-			foreach (PlayListTimeNode plNode in list) {
+			Gtk.ListStore listStore = new ListStore(typeof(PlayListPlay));
+			foreach (PlayListPlay plNode in list) {
 				listStore.AppendValues(plNode);
 			}
 			return listStore;
@@ -172,7 +172,7 @@ namespace LongoMatch.Playlist
 			listStore.GetIterFirst(out iter);
 			list.Clear();
 			while (listStore.IterIsValid(iter)) {
-				list.Add(listStore.GetValue(iter, 0) as PlayListTimeNode);
+				list.Add(listStore.GetValue(iter, 0) as PlayListPlay);
 				listStore.IterNext(ref iter);
 			}
 		}
diff --git a/LongoMatch/Time/Category.cs b/LongoMatch/Time/Category.cs
new file mode 100644
index 0000000..f768ee6
--- /dev/null
+++ b/LongoMatch/Time/Category.cs
@@ -0,0 +1,114 @@
+// SectionsTimeNode.cs
+//
+//  Copyright (C) 2007-2009 Andoni Morales Alastruey
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//
+
+using System;
+using System.Runtime.Serialization;
+using Gdk;
+using Mono.Unix;
+using LongoMatch.Common;
+
+namespace LongoMatch.TimeNodes
+{
+
+	/// <summary>
+	/// I am a tagging category for the analysis. I contain the default values to creates plays
+	/// tagged in my category
+	/// </summary>
+	[Serializable]
+	public class Category:TimeNode, ISerializable
+	{
+		
+		
+		#region Constructors
+		#endregion
+		public Category (){
+			
+		}
+		#region  Properties
+
+		/// <value>
+		/// A key combination to create plays in my category
+		/// </value>
+		public HotKey HotKey {
+			get;
+			set;
+		}
+
+		/// <value>
+		/// A color to draw plays from my category
+		/// </value>
+		public Color Color {
+			get;
+			set;
+		}
+		
+		//// <value>
+		/// Sort method used to sort plays for this category 
+		/// </value>
+		public SortMethodType SortMethod{
+			get;
+			set;
+		}
+		
+		public int Position{
+			get;
+			set;
+		}
+			
+		public string SortMethodString{
+			get{
+				switch (SortMethod){
+					case SortMethodType.SortByName:
+						return Catalog.GetString("Sort by name");
+					case SortMethodType.SortByStartTime:
+						return Catalog.GetString("Sort by start time");
+					case SortMethodType.SortByStopTime:
+						return Catalog.GetString("Sort by stop time");
+					case SortMethodType.SortByDuration:
+						return Catalog.GetString("Sort by duration");
+					default:
+						return Catalog.GetString("Sort by name");
+				}						
+			}
+			set{			
+				if (value == Catalog.GetString("Sort by start time"))
+					SortMethod = SortMethodType.SortByStartTime;
+				else if (value == Catalog.GetString("Sort by stop time"))
+					SortMethod = SortMethodType.SortByStopTime;
+				else if (value == Catalog.GetString("Sort by duration"))
+					SortMethod = SortMethodType.SortByDuration;
+				else
+					SortMethod = SortMethodType.SortByName;
+			}
+		}
+		// this method is automatically called during serialization
+		public void GetObjectData(SerializationInfo info, StreamingContext context) {
+			info.AddValue("name", Name);
+			info.AddValue("start", Start);
+			info.AddValue("stop", Stop);
+			info.AddValue("hotkey", HotKey);
+			info.AddValue("position", Position);
+			info.AddValue("red", Color.Red);
+			info.AddValue("green", Color.Green);
+			info.AddValue("blue", Color.Blue);
+		}
+		#endregion	
+	}
+}
diff --git a/LongoMatch/Time/PixbufTimeNode.cs b/LongoMatch/Time/PixbufTimeNode.cs
index ab02b3d..d790d0b 100644
--- a/LongoMatch/Time/PixbufTimeNode.cs
+++ b/LongoMatch/Time/PixbufTimeNode.cs
@@ -37,30 +37,6 @@ namespace LongoMatch.TimeNodes
 		#region Contructors
 		public PixbufTimeNode() {
 		}
-
-		/// <summary>
-		/// Creates a new PixbufTimeNode object
-		/// </summary>
-		/// <param name="name">
-		/// A <see cref="System.String"/> with my name
-		/// </param>
-		/// <param name="start">
-		/// A <see cref="Time"/> with my start time
-		/// </param>
-		/// <param name="stop">
-		/// A <see cref="Time"/> with my stop time
-		/// </param>
-		/// <param name="thumbnail">
-		/// A <see cref="Pixbuf"/> with my preview
-		/// </param>
-		public PixbufTimeNode(string name, Time start, Time stop, Pixbuf thumbnail): base(name,start,stop)
-		{
-			if (thumbnail != null) {
-				this.thumbnailBuf = thumbnail.SaveToBuffer("png");
-				thumbnail.Dispose();
-			}
-			else thumbnailBuf = null;
-		}
 		#endregion
 
 		#region Properties
diff --git a/LongoMatch/Time/Play.cs b/LongoMatch/Time/Play.cs
new file mode 100644
index 0000000..f209627
--- /dev/null
+++ b/LongoMatch/Time/Play.cs
@@ -0,0 +1,278 @@
+// MediaTimeNode.cs
+//
+//  Copyright (C) 2007-2009 Andoni Morales Alastruey
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Mono.Unix;
+using Gdk;
+using LongoMatch.Common;
+
+namespace LongoMatch.TimeNodes
+{
+
+	/// <summary>
+	/// I represent a Play in the game, that's why I'm probably the most
+	/// important object of the database.
+	/// I have a name to describe the play as well as a start and a stop { LongoMatch TimeNode Time},
+	/// which sets the play's position in the game's time line.
+	/// I also stores a list a { LongoMatch TimeNode Player} tagged to this play.
+	/// </summary>
+
+	[Serializable]
+	public class  Play : PixbufTimeNode
+	{
+
+		#region Constructors
+		public Play(){
+			Players = new List<Player>();
+			Tags = new List<Tag>();
+		}
+		#endregion
+
+		#region Properties
+		
+		public Category Category {
+			get;
+			set;
+		}
+		
+		/// <value>
+		/// Play's notes
+		/// </value>
+		public string Notes {
+			get;
+			set;
+		}
+
+		/// <value>
+		/// The <see cref="LongoMatch.TimeNode.Team"/> associated to this play
+		/// </value>
+		public Team Team {
+			get;
+			set;
+		}
+
+		/// <value>
+		/// Video frameratein frames per second. This value is taken from the
+		/// video file properties and used to translate from seconds
+		/// to frames: second 100 is equivalent to frame 100*fps
+		/// </value>
+		public uint Fps {
+			get;
+			set;
+		}
+
+		/// <value>
+		/// Start frame number
+		/// </value>
+		public uint StartFrame {
+			get {
+				return (uint) (Start.MSeconds / (Fps * 1000));
+			}
+			set {
+				Start = new Time((int)(1000*value/Fps));
+			}
+		}
+
+		/// <value>
+		/// Stop frame number
+		/// </value>
+		public uint StopFrame {
+			get {
+				return (uint) (Stop.MSeconds / (Fps * (uint)1000));
+			}
+			set {
+				Stop = new Time((int)(1000*value/Fps));
+			}
+		}
+
+		/// <value>
+		/// Get the key frame number if this play as key frame drawing or 0
+		/// </value>
+		public uint KeyFrame {
+			get {
+				if (HasKeyFrame)
+					return (uint) KeyFrameDrawing.StopTime*Fps/1000;
+				else return 0;
+			}
+		}
+
+		/// <value>
+		/// Get/Set wheter this play is actually loaded. Used in { LongoMatch Gui Component TimeScale}
+		/// </value>
+		public bool Selected {
+			get;
+			set;
+		}
+
+		/// <value>
+		/// Get/Set a list of the players tagged to this play
+		/// </value>
+		public List<Player> Players {
+			get;
+			set;
+		}
+		
+		public List<Player> LocalPlayers {
+			get{
+				return 
+					(from player in Players
+					 where player.Team == Team.LOCAL
+					 select player
+					 ).ToList();
+			}
+		}
+		
+		public List<Player> VisitorPlayers {
+			get{
+				return 
+					(from player in Players
+					 where player.Team == Team.VISITOR
+					 select player
+					 ).ToList();
+			}
+		}
+
+		/// <value>
+		/// Get/Set the key frame's <see cref="LongoMatch.TimeNodes.Drawing"/>
+		/// </value>
+		public Drawing KeyFrameDrawing {
+			get;
+			set;
+		}
+
+		/// <value>
+		/// Get wether the play has as defined a key frame
+		/// </value>
+		public bool HasKeyFrame {
+			get {
+				return KeyFrameDrawing != null;
+			}
+		}
+		
+		/// <value>
+		/// Central frame number using (stopFrame-startFrame)/2
+		/// </value>
+		public uint CentralFrame {
+			get {
+				return StopFrame-((TotalFrames)/2);
+			}
+		}
+
+		/// <value>
+		/// Number of frames inside the play's boundaries
+		/// </value>
+		public uint TotalFrames {
+			get {
+				return StopFrame-StartFrame;
+			}
+		}
+
+		//// <value>
+		/// Play's tags 
+		/// </value>
+		public List<Tag> Tags{
+			get;
+			set;
+		}
+		#endregion
+
+		#region Public methods
+		/// <summary>
+		/// Check the frame number is inside the play boundaries
+		/// </summary>
+		/// <param name="frame">
+		/// A <see cref="System.Int32"/> with the frame number
+		/// </param>
+		/// <returns>
+		/// A <see cref="System.Boolean"/>
+		/// </returns>
+		public bool HasFrame(int frame) {
+			return (frame>=StartFrame && frame<StopFrame);
+		}
+
+		public bool HasPlayer(Player player){
+			return Players.Contains(player);
+		}
+		
+		/// <summary>
+		/// Add a player to the player's list
+		/// </summary>
+		/// <param name="player">
+		/// The <see cref="LongoMatch.TimeNode.Player"/> to add
+		/// </param>
+		public void AddPlayer(Player player) {
+			Players.Add(player);
+		}
+
+		/// <summary>
+		/// Removes a player from the player's list
+		/// </summary>
+		/// <param name="player">
+		/// The <see cref="LongoMatch.TimeNode.Player"/> to remove
+		/// </param>
+		public void RemovePlayer(Player Player) {
+			Players.Remove(Player);
+		}
+		
+		/// <summary>
+		/// Adds a new tag to the play 
+		/// </summary>
+		/// <param name="tag">
+		/// A <see cref="Tag"/>: the tag to add
+		/// </param>
+		public void AddTag(Tag tag){
+			if (!Tags.Contains(tag))
+				Tags.Add(tag);
+		}
+		
+		/// <summary>
+		/// Removes a tag to the play
+		/// </summary>
+		/// <param name="tag">
+		/// A <see cref="Tag"/>: the tag to remove
+		/// </param>
+		public void RemoveTag(Tag tag){
+			if (Tags.Contains(tag))
+				Tags.Remove(tag);
+		}
+		
+		public string ToString (string team)
+		{
+			String[] tags = new String[Tags.Count];
+			
+			for (int i=0; i<Tags.Count; i++)
+				tags[i] = Tags[i].Value;
+			
+			return  "<b>"+Catalog.GetString("Name")+": </b>"+Name+"\n"+
+				    "<b>"+Catalog.GetString("Team")+": </b>"+team+"\n"+
+					"<b>"+Catalog.GetString("Start")+": </b>"+Start.ToMSecondsString()+"\n"+
+					"<b>"+Catalog.GetString("Stop")+": </b>"+Stop.ToMSecondsString()+"\n"+
+					"<b>"+Catalog.GetString("Tags")+": </b>"+ String.Join(" ; ", tags);
+		}
+		
+		public override string ToString(){
+			return ToString(Team.ToString());
+		}
+
+		#endregion
+	}
+}
diff --git a/LongoMatch/Time/PlayListTimeNode.cs b/LongoMatch/Time/PlayListPlay.cs
similarity index 71%
rename from LongoMatch/Time/PlayListTimeNode.cs
rename to LongoMatch/Time/PlayListPlay.cs
index 5170baf..0d8865d 100644
--- a/LongoMatch/Time/PlayListTimeNode.cs
+++ b/LongoMatch/Time/PlayListPlay.cs
@@ -29,29 +29,12 @@ namespace LongoMatch.TimeNodes
 	/// I stores the information of the video file I belong to and that's why I am independent of any context.
 	/// </summary>
 	[Serializable]
-	public class PlayListTimeNode : TimeNode
+	public class PlayListPlay : TimeNode
 	{
 		private MediaFile mediaFile;
-		private float rate=1;
-		private bool valid=true; //True if the file exists
 
 		#region Constructors
-		public PlayListTimeNode() {
-		}
-
-		/// <summary>
-		///  Creates a new playlist element
-		/// </summary>
-		/// <param name="mediaFile">
-		/// A <see cref="MediaFile"/> with my video file's information
-		/// </param>
-		/// <param name="tNode">
-		/// A <see cref="MediaTimeNode"/> with the play I come from
-		/// </param>
-		public PlayListTimeNode(MediaFile mediaFile, MediaTimeNode tNode) : base(tNode.Name,tNode.Start,tNode.Stop)
-		{
-			MediaFile = mediaFile;
-
+		public PlayListPlay() {
 		}
 		#endregion
 
@@ -81,24 +64,16 @@ namespace LongoMatch.TimeNodes
 		/// My play rate
 		/// </value>
 		public float Rate {
-			set {
-				this.rate = value;
-			}
-			get {
-				return this.rate;
-			}
+			get;
+			set;
 		}
 
 		//// <value>
 		/// I wont't be valid if my file doesn't exists
 		/// </value>
 		public bool Valid {
-			get {
-				return this.valid;
-			}
-			set {
-				this.valid = value;
-			}
+			get;
+			set;
 		}
 		#endregion
 	}
diff --git a/LongoMatch/Time/Player.cs b/LongoMatch/Time/Player.cs
index e6b2a3f..45a17fd 100644
--- a/LongoMatch/Time/Player.cs
+++ b/LongoMatch/Time/Player.cs
@@ -18,6 +18,7 @@
 
 using System;
 using Gdk;
+using LongoMatch.Common;
 
 namespace LongoMatch.TimeNodes
 {
@@ -27,59 +28,11 @@ namespace LongoMatch.TimeNodes
 	[Serializable]
 	public class Player
 	{
-		private string name;
-		private string position;
-		private int number;
 		private byte[] photo;
-		/* Added in 0.16.1 */
-		private float height;
-		private int weight;
-		private DateTime birthday;
-		private String nationality;
-		/* Added in 0.16.4 */
-		private bool discarded;
 
-		/// <summary>
-		/// Creates a new player
-		/// </summary>
-		/// <param name="name">
-		/// A <see cref="System.String"/> with my name
-		/// </param>
-		/// <param name="birthday">
-		/// A <see cref="DateTime"/> with my name
-		/// </param>
-		/// <param name="nationality">
-		/// A <see cref="System.String"/> with my nationality
-		/// </param>
-		/// <param name="height">
-		/// A <see cref="System.Float"/> with my height
-		/// </param>
-		/// <param name="weight">
-		/// A <see cref="System.Int32"/> with my weight
-		/// </param>
-		/// <param name="position">
-		/// A <see cref="System.String"/> with my position in the field
-		/// </param>
-		/// <param name="number">
-		/// A <see cref="System.Int32"/> with my number
-		/// </param>
-		/// <param name="photo">
-		/// A <see cref="Pixbuf"/> with my photo
-		/// </param>
 		#region Constructors
-		public Player(string name, DateTime birthday, String nationality, 
-		              float height, int weight, string position,
-		              int number, Pixbuf photo, bool discarded)
+		public Player()
 		{
-			this.name = name;
-			this.birthday = birthday;
-			this.nationality = nationality;
-			this.height = height;
-			this.weight = weight;
-			this.position = position;
-			this.number = number;
-			this.discarded = discarded;
-			Photo = photo;
 		}
 		#endregion
 
@@ -88,36 +41,29 @@ namespace LongoMatch.TimeNodes
 		/// My name
 		/// </value>
 		public string Name {
-			get {
-				return name;
-			}
-			set {
-				name=value;
-			}
+			get;
+			set;
+		}
+		
+		public Team Team{
+			get;
+			set;
 		}
 
 		/// <value>
 		/// My position in the field
 		/// </value>
 		public string Position {
-			get {
-				return position;
-			}
-			set {
-				position=value;
-			}
+			get;
+			set;
 		}
 
 		/// <value>
 		/// My shirt number
 		/// </value>
 		public int Number {
-			get {
-				return number;
-			}
-			set {
-				number=value;
-			}
+			get;
+			set;
 		}
 
 		/// <value>
@@ -142,48 +88,37 @@ namespace LongoMatch.TimeNodes
 		/// My birthdayt
 		/// </value>
 		public DateTime Birthday{
-			get {
-				return birthday;
-			}
-			set {
-				birthday = value;
-			}
+			get;
+			set;
 		}
 		
 		/// <value>
 		/// My nationality
 		/// </value>
 		public String Nationality{
-			get {
-				return nationality;
-			}
-			set {
-				nationality = value;
-			}
+			get;
+			set;
 		}
 		
 		/// <value>
 		/// My height
 		/// </value>
 		public float Height{
-			get {
-				return height;
-			}
-			set {
-				height = value;
-			}
+			get;
+			set;
 		}
 
 		/// <value>
 		/// My Weight
 		/// </value>
 		public int Weight{
-			get {
-				return weight;
-			}
-			set {
-				weight = value;
-			}
+			get;
+			set;
+		}
+		
+		public bool Playing{
+			get;
+			set;
 		}
 		
 		/// <value>
@@ -192,12 +127,8 @@ namespace LongoMatch.TimeNodes
 		/// template in a team, definning if this plays plays or not.
 		/// </value>
 		public bool Discarded{
-			get {
-				return discarded;
-			}
-			set {
-				discarded = value;
-			}
+			get;
+			set;
 		}
 		#endregion
 	}
diff --git a/LongoMatch/Time/Tag.cs b/LongoMatch/Time/Tag.cs
index 5214cf9..2ce2776 100644
--- a/LongoMatch/Time/Tag.cs
+++ b/LongoMatch/Time/Tag.cs
@@ -24,27 +24,23 @@ namespace LongoMatch.TimeNodes
 	[Serializable]
 	public class Tag
 	{
-		string text;
 		
-		public Tag(string text)
+		public Tag()
 		{
-			this.text=text;
 		}
 
-		public string Text {
-			get {
-				return text;
-			}
-			set {
-				if (value == null)
-					text="";
-				else
-					text=value;
-			}
+		public string TagCategory {
+			get;
+			set;
+		}
+		
+		public string Value {
+			get;
+			set;
 		}
 
 		public bool Equals(Tag tagComp) {
-			return (text == tagComp.Text);
+			return (TagCategory == tagComp.TagCategory && Value == tagComp.Value);
 		}
 
 		public override bool Equals(object obj)
@@ -58,7 +54,7 @@ namespace LongoMatch.TimeNodes
 
 		public override int GetHashCode()
 		{
-			return text.GetHashCode();
+			return TagCategory.GetHashCode() &&  Text.GetHashCode();
 		}
 	}
 }
diff --git a/LongoMatch/Time/TimeNode.cs b/LongoMatch/Time/TimeNode.cs
index 08b8197..88f3c02 100644
--- a/LongoMatch/Time/TimeNode.cs
+++ b/LongoMatch/Time/TimeNode.cs
@@ -32,34 +32,9 @@ namespace LongoMatch.TimeNodes
 	[Serializable]
 	public class TimeNode
 	{
-		private string name;
-
-		private Time start;
-
-		private Time stop;
-
 		#region Constructors
 		public TimeNode() {
 		}
-
-		/// <summary>
-		/// Creates a TimeNode object
-		/// </summary>
-		/// <param name="name">
-		/// A <see cref="System.String"/> with my name
-		/// </param>
-		/// <param name="start">
-		/// A <see cref="Time"/> with my start time
-		/// </param>
-		/// <param name="stop">
-		/// A <see cref="Time"/> with my stop time
-		/// </param>
-		public TimeNode(String name,Time start, Time stop)
-		{
-			this.name = name;
-			this.start = start;
-			this.stop = stop;
-		}
 		#endregion
 
 		#region Properties
@@ -67,36 +42,24 @@ namespace LongoMatch.TimeNodes
 		/// A short description of myself
 		/// </value>
 		public string Name {
-			get {
-				return this.name;
-			}
-			set {
-				this.name=value;
-			}
+			get;
+			set;
 		}
 
 		//// <value>
 		/// My start time
 		/// </value>
 		public Time Start {
-			get {
-				return this.start;
-			}
-			set {
-				this.start=value;
-			}
+			get;
+			set;
 		}
 
 		/// <value>
 		/// My stop time
 		/// </value>
 		public Time Stop {
-			get {
-				return stop;
-			}
-			set {
-				this.stop = value;
-			}
+			get;
+			set;
 		}
 
 		/// <value>
@@ -110,7 +73,6 @@ namespace LongoMatch.TimeNodes
 		#endregion
 
 		#region Public methods
-
 		/// <summary>
 		/// Change my boundaries
 		/// </summary>
@@ -121,8 +83,8 @@ namespace LongoMatch.TimeNodes
 		/// My new stop <see cref="Time"/>
 		/// </param>
 		public void ChangeStartStop(Time start, Time stop) {
-			this.start = start;
-			this.stop = stop;
+			Start = start;
+			Stop = stop;
 		}
 		#endregion
 	}
diff --git a/LongoMatch/gtk-gui/gui.stetic b/LongoMatch/gtk-gui/gui.stetic
index f22a5de..b44dbe4 100644
--- a/LongoMatch/gtk-gui/gui.stetic
+++ b/LongoMatch/gtk-gui/gui.stetic
@@ -1581,8 +1581,6 @@
               <widget class="LongoMatch.Gui.Component.CategoriesTreeView" id="sectionstreeview1">
                 <property name="MemberName" />
                 <property name="CanFocus">True</property>
-                <signal name="SectionClicked" handler="OnSectionstreeview1SectionClicked" />
-                <signal name="SectionsSelected" handler="OnSectionstreeview1SectionsSelected" />
               </widget>
             </child>
           </widget>
@@ -4461,201 +4459,6 @@ No</property>
       </widget>
     </child>
   </widget>
-  <widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.Migrator" design-size="821 300">
-    <property name="MemberName" />
-    <property name="Icon">stock:longomatch Menu</property>
-    <property name="WindowPosition">CenterOnParent</property>
-    <property name="Buttons">2</property>
-    <property name="HelpButton">False</property>
-    <child internal-child="VBox">
-      <widget class="Gtk.VBox" id="dialog1_VBox">
-        <property name="MemberName" />
-        <property name="BorderWidth">2</property>
-        <child>
-          <widget class="Gtk.HBox" id="hbox1">
-            <property name="MemberName" />
-            <property name="Spacing">6</property>
-            <child>
-              <widget class="Gtk.Frame" id="frame1">
-                <property name="MemberName" />
-                <property name="ShadowType">None</property>
-                <child>
-                  <widget class="Gtk.Alignment" id="GtkAlignment2">
-                    <property name="MemberName" />
-                    <property name="Xalign">0</property>
-                    <property name="Yalign">0</property>
-                    <property name="LeftPadding">12</property>
-                    <child>
-                      <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
-                        <property name="MemberName" />
-                        <property name="CanFocus">True</property>
-                        <property name="ShadowType">In</property>
-                        <child>
-                          <widget class="Gtk.TextView" id="dbtextview">
-                            <property name="MemberName" />
-                            <property name="CanFocus">True</property>
-                            <property name="Text" translatable="yes" />
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="Gtk.Label" id="GtkLabel2">
-                    <property name="MemberName" />
-                    <property name="LabelProp" translatable="yes">&lt;b&gt;Data Base Migration&lt;/b&gt;</property>
-                    <property name="UseMarkup">True</property>
-                  </widget>
-                  <packing>
-                    <property name="type">label_item</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="Position">0</property>
-                <property name="AutoSize">False</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="Gtk.Frame" id="frame2">
-                <property name="MemberName" />
-                <property name="ShadowType">None</property>
-                <child>
-                  <widget class="Gtk.Alignment" id="GtkAlignment3">
-                    <property name="MemberName" />
-                    <property name="Xalign">0</property>
-                    <property name="Yalign">0</property>
-                    <property name="LeftPadding">12</property>
-                    <child>
-                      <widget class="Gtk.ScrolledWindow" id="scrolledwindow2">
-                        <property name="MemberName" />
-                        <property name="CanFocus">True</property>
-                        <property name="ShadowType">In</property>
-                        <child>
-                          <widget class="Gtk.TextView" id="pltextview">
-                            <property name="MemberName" />
-                            <property name="CanFocus">True</property>
-                            <property name="Text" translatable="yes" />
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="Gtk.Label" id="GtkLabel3">
-                    <property name="MemberName" />
-                    <property name="LabelProp" translatable="yes">&lt;b&gt;Playlists Migration&lt;/b&gt;</property>
-                    <property name="UseMarkup">True</property>
-                  </widget>
-                  <packing>
-                    <property name="type">label_item</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="Position">1</property>
-                <property name="AutoSize">False</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="Gtk.Frame" id="frame3">
-                <property name="MemberName" />
-                <property name="ShadowType">None</property>
-                <child>
-                  <widget class="Gtk.Alignment" id="GtkAlignment4">
-                    <property name="MemberName" />
-                    <property name="Xalign">0</property>
-                    <property name="Yalign">0</property>
-                    <property name="LeftPadding">12</property>
-                    <child>
-                      <widget class="Gtk.ScrolledWindow" id="scrolledwindow3">
-                        <property name="MemberName" />
-                        <property name="CanFocus">True</property>
-                        <property name="ShadowType">In</property>
-                        <child>
-                          <widget class="Gtk.TextView" id="tptextview">
-                            <property name="MemberName" />
-                            <property name="CanFocus">True</property>
-                            <property name="Text" translatable="yes" />
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="Gtk.Label" id="GtkLabel4">
-                    <property name="MemberName" />
-                    <property name="LabelProp" translatable="yes">&lt;b&gt;Templates Migration&lt;/b&gt;</property>
-                    <property name="UseMarkup">True</property>
-                  </widget>
-                  <packing>
-                    <property name="type">label_item</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="Position">2</property>
-                <property name="AutoSize">False</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="Position">0</property>
-            <property name="AutoSize">True</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-    <child internal-child="ActionArea">
-      <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
-        <property name="MemberName" />
-        <property name="Spacing">6</property>
-        <property name="BorderWidth">5</property>
-        <property name="Size">2</property>
-        <property name="LayoutStyle">End</property>
-        <child>
-          <widget class="Gtk.Button" id="buttonCancel">
-            <property name="MemberName" />
-            <property name="Visible">False</property>
-            <property name="Sensitive">False</property>
-            <property name="CanDefault">True</property>
-            <property name="CanFocus">True</property>
-            <property name="UseStock">True</property>
-            <property name="Type">StockItem</property>
-            <property name="StockId">gtk-cancel</property>
-            <property name="ResponseId">-6</property>
-            <signal name="Clicked" handler="OnButtonCancelClicked" />
-            <property name="label">gtk-cancel</property>
-          </widget>
-          <packing>
-            <property name="Expand">False</property>
-            <property name="Fill">False</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="Gtk.Button" id="buttonOk">
-            <property name="MemberName" />
-            <property name="Visible">False</property>
-            <property name="CanDefault">True</property>
-            <property name="CanFocus">True</property>
-            <property name="UseStock">True</property>
-            <property name="Type">StockItem</property>
-            <property name="StockId">gtk-ok</property>
-            <property name="ResponseId">-5</property>
-            <property name="label">gtk-ok</property>
-          </widget>
-          <packing>
-            <property name="Position">1</property>
-            <property name="Expand">False</property>
-            <property name="Fill">False</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
   <widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.Win32CalendarDialog" design-size="219 225">
     <property name="MemberName" />
     <property name="Title" translatable="yes">Calendar</property>
@@ -6061,4 +5864,4 @@ You can continue with the current capture, cancel it or save your project.
       </widget>
     </child>
   </widget>
-</stetic-interface>
\ No newline at end of file
+</stetic-interface>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]