Edge of cube poking out
All you need to do to get ride of these edges is simply delete them, and then refill the empty spaces.  Just follow along with the images below:
step 1: in edit mode, select all undesired edges

Step 2: press the &quot;x&quot; key, then click on &quot;edges&quot;

Step 3: your shape should look like this after steps 1 &amp; 2

Step 4: Select all the edges on one side around the spot with a hole

Step 5:  with the edges around one of the holes selected, press the &quot;f&quot; key on your keyboard.  After that, it should fill in the hole, like in the image below:

Step 6:  Repeat steps 4 &amp; 5 on the other 3 holes.  After that.  You should have a mesh that looks something like this:

hope this helped!  If you encounter further problems, let me know :)
(PS, if this answer solved your problem, please mark it as accepted)