diff --git a/Components/Docs.js b/Components/Docs.js
new file mode 100644
index 0000000..5e6b623
--- /dev/null
+++ b/Components/Docs.js
@@ -0,0 +1,35 @@
+import react, { Component } from "react";
+import Styles from '../styles/Components/cardrow.module.css';
+
+class Docs extends Component {
+    /*
+        Properties:
+        - header: Header component
+        Children:
+        - List of sections
+    */
+	constructor(props) {
+		super(props);
+	}
+
+	render() {
+		return "a"
+	}
+}
+
+class Section extends Component {
+    /*
+
+    */
+    constructor(props) {
+        super(props);
+    }
+
+    render() {
+        return "a"
+    }
+}
+
+
+
+export default CardRow;
\ No newline at end of file
diff --git a/Components/LEGACY/AutoSpacing.js b/Components/LEGACY/AutoSpacing.js
new file mode 100644
index 0000000..e90da58
--- /dev/null
+++ b/Components/LEGACY/AutoSpacing.js
@@ -0,0 +1,23 @@
+import react, { Component } from "react";
+import Styles from '../styles/autospacing.module.css';
+
+class AutoSpacing extends Component {
+	constructor(props) {
+		super(props);
+	}
+
+
+	render() {
+		return (
+            <div className={Styles.container}>
+				{
+					react.Children.toArray(this.props.children).map((item, index) => {
+						return <div className={Styles.item} key={index}>{item}</div>
+					})
+				}
+			</div>
+        )
+	}
+}
+
+export default AutoSpacing;
\ No newline at end of file
diff --git a/Components/LEGACY/Paragraph.js b/Components/LEGACY/Paragraph.js
new file mode 100644
index 0000000..c332832
--- /dev/null
+++ b/Components/LEGACY/Paragraph.js
@@ -0,0 +1,13 @@
+import { Component } from 'react';
+
+class Paragraph extends Component {
+    render () {
+        return (
+            <p style={{width: "100%", textAlign: "left", paddingLeft: "15%", paddingRight: "15%", fontSize: "120%", color: "var(--card-text-color)"}}>
+                {this.props.children}
+            </p>
+        );
+    }
+}
+
+export default Paragraph;
\ No newline at end of file
diff --git a/Components/LEGACY/Scroller.js b/Components/LEGACY/Scroller.js
new file mode 100644
index 0000000..69e0fa3
--- /dev/null
+++ b/Components/LEGACY/Scroller.js
@@ -0,0 +1,22 @@
+import { Component } from "react";
+import Styles from '../styles/scroller.module.css';
+
+class Scroller extends Component {
+    constructor(props) {
+        super(props);
+    }
+    render() {
+        this.props.text = this.props.text.concat(this.props.text);
+        return (
+            <div className={Styles.container}>
+                {
+                    this.props.text.map((item, index) => {
+                        console.log([this.props.text, this.props.text])
+                        return <div className={Styles.item} key={index}>{item}</div>;
+                    })
+                }
+            </div>
+        )
+    }
+}
+export default Scroller;
diff --git a/Components/LEGACY/SectionHeading.js b/Components/LEGACY/SectionHeading.js
new file mode 100644
index 0000000..ed77661
--- /dev/null
+++ b/Components/LEGACY/SectionHeading.js
@@ -0,0 +1,17 @@
+import { Component } from "react";
+import Styles from '../styles/sectionheading.module.css';
+
+class SectionHeading extends Component {
+	constructor(props) {
+		super(props);
+	}
+
+
+	render() {
+		return (
+            <h1 className={Styles.title} id={this.props.id}>{this.props.children}</h1>
+        )
+	}
+}
+
+export default SectionHeading;
\ No newline at end of file
diff --git a/Components/LEGACY/Subheading.js b/Components/LEGACY/Subheading.js
new file mode 100644
index 0000000..964f1dd
--- /dev/null
+++ b/Components/LEGACY/Subheading.js
@@ -0,0 +1,17 @@
+import { Component } from "react";
+import Styles from '../styles/subheading.module.css';
+
+class SubHeading extends Component {
+	constructor(props) {
+		super(props);
+	}
+
+
+	render() {
+		return (
+            <h2 className={Styles.title} id={this.props.id}>{this.props.children}</h2>
+        )
+	}
+}
+
+export default SubHeading;
\ No newline at end of file
diff --git a/Components/LEGACY/TileRow.js b/Components/LEGACY/TileRow.js
new file mode 100644
index 0000000..ed0bf0b
--- /dev/null
+++ b/Components/LEGACY/TileRow.js
@@ -0,0 +1,33 @@
+import react, { Component, cloneElement } from "react";
+import Styles from '../styles/tilerow.module.css';
+
+class TileRow extends Component {
+    constructor(props) {
+	super(props);
+    }
+    render() {
+	return (
+		<div className={Styles.container}>
+		{
+		    react.Children.toArray(this.props.children).map((item, index) => {
+			if (this.props.divless !== false) { // Intentional comparison to false, initially had a default of false, now has a default of true
+			    const className = (item.props.className ? item.props.className + " " : "") + Styles.item
+
+			    const key = index;
+
+			    const props = {
+				className,
+				key
+			    }
+
+			    return cloneElement(item, props);
+			} else {
+			    return <div className={Styles.item + " " + Styles.fitItemWidth} key={index}>{item}</div>;
+			}
+		    })
+		}
+	    </div>
+	)
+    }
+}
+export default TileRow;
diff --git a/Components/LEGACY/Timeline.js b/Components/LEGACY/Timeline.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Components/LEGACY/Timeline.js
diff --git a/Components/Panels.js b/Components/Panels.js
new file mode 100644
index 0000000..3c1d2e6
--- /dev/null
+++ b/Components/Panels.js
@@ -0,0 +1,105 @@
+import react, { Component } from "react";
+import Styles from '../styles/Components/panels.module.css';
+import handleViewport from 'react-in-viewport';
+
+
+class PanelClass extends Component {
+	constructor(props) {
+		super(props);
+	}
+
+	getStyle() {
+		const { inViewport, enterCount } = this.props;
+		if (inViewport && enterCount === 1) { return { WebkitTransition: 'all 0.75s ease-in-out', opacity: '1', transform: "translateY(0px)" };
+		} else if (!inViewport && enterCount < 1) { return { WebkitTransition: 'none', opacity: '0', transform: "translateY(20px)" };
+		} else { return {}; }
+	}
+
+	render() {
+		return <div className={Styles.panel} style={this.getStyle()} id={this.props.id}>
+				{
+					react.Children.toArray(this.props.children).map((child, index) => {
+						return child;
+					})
+				}
+		</div>
+	}
+}
+
+
+class AutoLayout extends Component {
+	constructor(props) {
+		super(props);
+		this.children = react.Children.toArray(this.props.children)
+		this.validity = []
+		this.calculateValidity()
+	}
+
+	calculateValidity() {
+		this.children.map((item, index) => {
+			if ( index > 0 && item.props.halfSize && this.validity[index - 1] == 'half1' ) {
+				this.validity[index] = 'half2';
+			} else if ( index > 0 && !item.props.halfSize && this.validity[index - 1] == 'half1' ) {
+				this.validity[index] = 'full';
+				this.validity[index - 1] = 'full';
+			} else if ( item.props.halfSize && !(index == this.props.children.length - 1) ) {
+				this.validity[index] = 'half1';
+			} else if ( index == this.props.children.length - 1 && this.validity[index - 1] == 'half1' ) {
+				this.validity[index] = 'full';
+				this.validity[index - 1] = 'full';
+			} else if ( index == this.props.children.length - 1 && this.validity[index - 1] == 'half2' ) {
+				this.validity[index] = 'full';
+			} else {
+				this.validity[index] = 'full';
+			}
+		})
+	}
+
+	render() {
+		return (
+            <div className={Styles.container}>
+				{
+					this.children.map((item, index) => {
+						if ( this.validity[index] == 'full' ) {
+							return this.children[index]
+						} else if ( this.validity[index] == 'half1' ) {
+							return <div key={index} className={Styles.doublePanel}>
+								{this.children[index]}
+								{this.children[index + 1]}
+							</div>
+						}
+					})
+				}
+			</div>
+        )
+	}
+}
+
+
+class Title extends Component {
+	render() {
+		return <h1 className={Styles.title}>{this.props.children}</h1>
+	}
+}
+
+class Subtitle extends Component {
+	render() {
+		return <h2 className={Styles.subtitle}>{this.props.children}</h2>
+	}
+}
+
+class Text extends Component {
+	render() {
+		return <p className={Styles.text}>{this.props.children}</p>
+	}
+}
+
+class Divider extends Component {
+	render() {
+		return <div className={Styles.divider}></div>
+	}
+}
+
+const Panel = handleViewport(PanelClass, { rootMargin: '-1.0px' });
+
+export { AutoLayout, Panel, Title, Subtitle, Text, Divider };
\ No newline at end of file
diff --git a/Components/Texttools.js b/Components/Texttools.js
new file mode 100644
index 0000000..5f929bd
--- /dev/null
+++ b/Components/Texttools.js
@@ -0,0 +1,72 @@
+import react, { Component } from "react";
+import Styles from '../styles/Components/texttools.module.css';
+import { Popover } from 'react-tiny-popover';
+
+
+class List extends Component {
+	constructor(props) {
+		super(props);
+	}
+
+	render() {
+		return (
+            <div className={Styles.list}>
+				{
+					react.Children.toArray(this.props.children).map((item, index) => {
+						return <div key={index} className={Styles.listItem}>
+                            <div className={Styles.square} style={{borderColor: `#${this.props.colour}`}} />
+                            <div>{item}</div>
+                        </div>
+					})
+				}
+			</div>
+        )
+	}
+}
+
+class ListItem extends Component {
+    render() {
+		return this.props.children
+	}
+}
+
+class Code extends Component {
+	constructor(props) {
+		super(props);
+		this.state = {
+			isPopoverOpen: false,
+		};
+	}
+
+	clicked() {
+		let content = this.props.children
+		navigator.clipboard.writeText(content)
+		this.setState({isPopoverOpen: true})
+		setTimeout(() => {
+			this.setState({isPopoverOpen: false})
+		}, 1000)
+	}
+
+	render() {
+		if ( this.props.clickable === false) {
+			return <pre
+				className={Styles.code}
+				style={{color: `#${this.props.colour}`, boxShadow: `0px -3px 10px 2px #000000`}}
+			>{this.props.children}</pre>
+		} else {
+			return <Popover
+				isOpen={this.state.isPopoverOpen}
+				positions={['top', 'bottom', 'left', 'right']} // preferred positions by priority
+				content={<Code colour={this.props.colour} clickable={false}>Copied!</Code>}
+			>
+				<pre
+					className={Styles.code}
+					style={{color: `#${this.props.colour}`}}
+					onClick={() => this.clicked()}
+				>{this.props.children}</pre>
+			</Popover>
+		}
+	}
+}
+
+export { List, ListItem, Code };
\ No newline at end of file
